<?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: How to check whether an element exists using jQuery</title>
	<atom:link href="http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/</link>
	<description>Freelance web and graphic designer, Swindon</description>
	<lastBuildDate>Fri, 26 Feb 2010 09:08:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: alex</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-33001</link>
		<dc:creator>alex</dc:creator>
		<pubDate>Fri, 26 Feb 2010 09:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-33001</guid>
		<description>thanks mate! was going crazy over this. thought id kill IE7 one more time because he kept throwing script errors at me :D

well thanks and have a good one!</description>
		<content:encoded><![CDATA[<p>thanks mate! was going crazy over this. thought id kill IE7 one more time because he kept throwing script errors at me <img src='http://www.aaronrussell.co.uk/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>well thanks and have a good one!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Radu</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-32407</link>
		<dc:creator>Radu</dc:creator>
		<pubDate>Fri, 12 Feb 2010 15:20:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-32407</guid>
		<description>I don&#039;t know but any element in my page is length = 0 . Even html.length = 0.

Just tried with jQuery
$(&#039;#someDiv&#039;).parents(&#039;html&#039;).length;
return 0.

Firebug show all my elements 0 length ...

Any ideas where the problem could be ?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know but any element in my page is length = 0 . Even html.length = 0.</p>
<p>Just tried with jQuery<br />
$(&#8216;#someDiv&#8217;).parents(&#8216;html&#8217;).length;<br />
return 0.</p>
<p>Firebug show all my elements 0 length &#8230;</p>
<p>Any ideas where the problem could be ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-31791</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Thu, 28 Jan 2010 10:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-31791</guid>
		<description>Cheers John! Saved me looking into it :) Code on my site is now fixed.</description>
		<content:encoded><![CDATA[<p>Cheers John! Saved me looking into it <img src='http://www.aaronrussell.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Code on my site is now fixed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-31769</link>
		<dc:creator>john</dc:creator>
		<pubDate>Wed, 27 Jan 2010 23:36:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-31769</guid>
		<description>looking at your css the pre tag that surrounds the $ is set to #FFFFFF by the rule #main .article pre unlike the rest of the contnet which is contained within span tag that set the colour to something else</description>
		<content:encoded><![CDATA[<p>looking at your css the pre tag that surrounds the $ is set to #FFFFFF by the rule #main .article pre unlike the rest of the contnet which is contained within span tag that set the colour to something else</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-31421</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Sat, 16 Jan 2010 22:56:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-31421</guid>
		<description>Tim - Something funky is happening with my code snippets on this site. Some characters are being rendered in white text on a white background (the $ symbol in this case). Haven&#039;t got a clue why, but I&#039;ll look into it and try and fix it soon.</description>
		<content:encoded><![CDATA[<p>Tim &#8211; Something funky is happening with my code snippets on this site. Some characters are being rendered in white text on a white background (the $ symbol in this case). Haven&#8217;t got a clue why, but I&#8217;ll look into it and try and fix it soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-31420</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Sat, 16 Jan 2010 20:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-31420</guid>
		<description>Correct me if I&#039;m wrong (which I very well could be), but I don&#039;t think you&#039;re using the jQuery selector engine without doing $(&quot;#mydiv&quot;) or jQuery(&quot;#mydiv&quot;).  You&#039;re using some default javascript selector.</description>
		<content:encoded><![CDATA[<p>Correct me if I&#8217;m wrong (which I very well could be), but I don&#8217;t think you&#8217;re using the jQuery selector engine without doing $(&#8220;#mydiv&#8221;) or jQuery(&#8220;#mydiv&#8221;).  You&#8217;re using some default javascript selector.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-31318</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 13 Jan 2010 16:02:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-31318</guid>
		<description>Excellent tip!! thank you kindly.</description>
		<content:encoded><![CDATA[<p>Excellent tip!! thank you kindly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-30187</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Tue, 15 Dec 2009 20:19:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-30187</guid>
		<description>Nice, thanks! exactly what I needed</description>
		<content:encoded><![CDATA[<p>Nice, thanks! exactly what I needed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-28661</link>
		<dc:creator>Phil</dc:creator>
		<pubDate>Mon, 09 Nov 2009 15:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-28661</guid>
		<description>Nice and simple - just what I need.

Cheers Aaron</description>
		<content:encoded><![CDATA[<p>Nice and simple &#8211; just what I need.</p>
<p>Cheers Aaron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Fitzgerald</title>
		<link>http://www.aaronrussell.co.uk/blog/check-if-an-element-exists-using-jquery/comment-page-1/#comment-24963</link>
		<dc:creator>Patrick Fitzgerald</dc:creator>
		<pubDate>Fri, 28 Aug 2009 15:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.aaronrussell.co.uk/?p=244#comment-24963</guid>
		<description>The easiest (smallest) test I have found is:
if ($(&#039;#mydiv&#039;)[0]) {
// do something
}</description>
		<content:encoded><![CDATA[<p>The easiest (smallest) test I have found is:<br />
if ($(&#8216;#mydiv&#8217;)[0]) {<br />
// do something<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
