<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: jQuery check for element visibility</title>
	<atom:link href="http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/</link>
	<description>about web development</description>
	<lastBuildDate>Fri, 03 Feb 2012 22:35:35 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Melanie Cowherd</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-14271</link>
		<dc:creator>Melanie Cowherd</dc:creator>
		<pubDate>Tue, 26 Apr 2011 05:20:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-14271</guid>
		<description>indeed</description>
		<content:encoded><![CDATA[<p>indeed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankur Dalal</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-14233</link>
		<dc:creator>Ankur Dalal</dc:creator>
		<pubDate>Wed, 06 Apr 2011 07:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-14233</guid>
		<description>Following have some options for check visibility. 
&lt;pre lang=&quot;javascript&quot;&gt;
if( $(&#039;#foo&#039;).is(&#039;:visible&#039;) ) {
  // it&#039;s visible, do something
}
else {
  // it&#039;s not visible so do something else
}
&lt;/pre&gt;

Check if an element is hidden
&lt;pre lang=&quot;javascript&quot;&gt;
if( $(&#039;#foo&#039;).is(&#039;:hidden&#039;) ) {
  // it&#039;s hidden, do something
}
else {
  // it&#039;s not hidden so do something else
}
&lt;/pre&gt;

Looping though visible elements

	    abc
	    def
	    ghi

To loop through the visible divs under #foo do something do this:
&lt;pre lang=&quot;javascript&quot;&gt;
$(&quot;#foo div:visible&quot;).each( function() {
	    document.write($(this).html()+&#039;&#039;);
});
&lt;/pre&gt;
The above example would write the following out to the document:

abc
ghi

Cheerssss !</description>
		<content:encoded><![CDATA[<p>Following have some options for check visibility.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#foo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// it's visible, do something</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// it's not visible so do something else</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Check if an element is hidden</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#foo'</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':hidden'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// it's hidden, do something</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #006600; font-style: italic;">// it's not hidden so do something else</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Looping though visible elements</p>
<p>	    abc<br />
	    def<br />
	    ghi</p>
<p>To loop through the visible divs under #foo do something do this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#foo div:visible&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The above example would write the following out to the document:</p>
<p>abc<br />
ghi</p>
<p>Cheerssss !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-14109</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Sat, 18 Dec 2010 13:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-14109</guid>
		<description>for the visibility check you can use this:
&lt;pre lang=&quot;javascript&quot;&gt;
$(element).is(&quot;:visible&quot;);
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>for the visibility check you can use this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span>.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;:visible&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: singsong</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-12746</link>
		<dc:creator>singsong</dc:creator>
		<pubDate>Wed, 31 Mar 2010 15:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-12746</guid>
		<description>Nice example works perfectly</description>
		<content:encoded><![CDATA[<p>Nice example works perfectly</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shikha</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-11503</link>
		<dc:creator>Shikha</dc:creator>
		<pubDate>Fri, 18 Dec 2009 12:31:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-11503</guid>
		<description>Fantastic code in just two lines !!! Great job</description>
		<content:encoded><![CDATA[<p>Fantastic code in just two lines !!! Great job</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilima Kadam</title>
		<link>http://www.stoimen.com/blog/2009/07/08/jquery-check-for-element-visibility/comment-page-1/#comment-3873</link>
		<dc:creator>Nilima Kadam</dc:creator>
		<pubDate>Wed, 22 Jul 2009 14:51:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.stoimen.com/blog/?p=661#comment-3873</guid>
		<description>Hi Good day,
  Thanks! this was really helpful &amp; simple to integrate. Thanks, keep up the good work!</description>
		<content:encoded><![CDATA[<p>Hi Good day,<br />
  Thanks! this was really helpful &amp; simple to integrate. Thanks, keep up the good work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

