{"id":210,"date":"2014-06-30T21:39:57","date_gmt":"2014-07-01T05:39:57","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=210"},"modified":"2014-06-30T21:40:47","modified_gmt":"2014-07-01T05:40:47","slug":"jquery-some-frequent-questions","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=210","title":{"rendered":"jquery &#8211; some frequent questions"},"content":{"rendered":"<p>1) How do I test if an element exists?<br \/>\nif ( $( &#8220;#myDiv&#8221; ).length ) {<br \/>\n     $( &#8220;#myDiv&#8221; ).show();<br \/>\n}<\/p>\n<p>2) How do I determine the state of a toggled element?<\/p>\n<p>var isVisible = $( &#8220;#myDiv&#8221; ).is( &#8220;:visible&#8221; );<\/p>\n<p>var isHidden = $( &#8220;#myDiv&#8221; ).is( &#8220;:hidden&#8221; );<\/p>\n<p>3) <\/p>\n","protected":false},"excerpt":{"rendered":"<p>1) How do I test if an element exists? if ( $( &#8220;#myDiv&#8221; ).length ) { $( &#8220;#myDiv&#8221; ).show(); } 2) How do I determine the state of a toggled element? var isVisible = $( &#8220;#myDiv&#8221; ).is( &#8220;:visible&#8221; ); var isHidden = $( &#8220;#myDiv&#8221; ).is( &#8220;:hidden&#8221; ); 3)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,3],"tags":[],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-javascript"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=210"}],"version-history":[{"count":2,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/210\/revisions"}],"predecessor-version":[{"id":212,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/210\/revisions\/212"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}