{"id":3688,"date":"2014-03-29T07:58:20","date_gmt":"2014-03-29T07:58:20","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/jquery-set-button-visible-if-exist-label-text-collection-of-common-programming-errors\/"},"modified":"2014-03-29T07:58:20","modified_gmt":"2014-03-29T07:58:20","slug":"jquery-set-button-visible-if-exist-label-text-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/29\/jquery-set-button-visible-if-exist-label-text-collection-of-common-programming-errors\/","title":{"rendered":"jQuery: set button visible if exist label.text-Collection of common programming errors"},"content":{"rendered":"<p>Something like this would probably be a starting point<\/p>\n<pre><code>$('label').each(function() {\n   if ($(this).text() == '') {\n      $(this).siblings('button').hide();\n   }\n});\n<\/code><\/pre>\n<p>How does the label related to the button ? im using .siblings() here so it would hide any buttons within the same parent<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Something like this would probably be a starting point $(&#8216;label&#8217;).each(function() { if ($(this).text() == &#8221;) { $(this).siblings(&#8216;button&#8217;).hide(); } }); How does the label related to the button ? im using .siblings() here so it would hide any buttons within the same parent<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3688","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3688"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3688\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}