<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Witheringtree &#187; jQuery</title>
	<atom:link href="http://www.witheringtree.com/index.php/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.witheringtree.com</link>
	<description>If a tree falls in the forest and no one is around to hear it fall… yeah, it still makes a sound.</description>
	<lastBuildDate>Sat, 31 Jul 2010 20:25:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>$(&#8220;#objectID&#8221;) != document.getElementById(&#8220;objectID&#8221;)</title>
		<link>http://www.witheringtree.com/index.php/2010/04/objectid-document-getelementbyidobjectid/</link>
		<comments>http://www.witheringtree.com/index.php/2010/04/objectid-document-getelementbyidobjectid/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 01:13:12 +0000</pubDate>
		<dc:creator>David Freerksen</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Tips/Tricks]]></category>

		<guid isPermaLink="false">http://www.witheringtree.com/?p=760</guid>
		<description><![CDATA[Using document.getElementById(&#8220;&#8230;&#8221;) in plain ol&#8217; Javascript will return a reference the DOM element by the given name. In jQuery, we use $ for everything. So I assumed using $(&#8220;#&#8230;&#8221;) would be the same thing. This is wrong. $(&#8220;#&#8230;&#8221;) will return an associative array (object) which is what allows us to change properties of the DOM [...]]]></description>
			<content:encoded><![CDATA[<p>Using document.getElementById(&#8220;&#8230;&#8221;) in plain ol&#8217; Javascript will return a reference the DOM element by the given name. In jQuery, we use $ for everything. So I assumed using $(&#8220;#&#8230;&#8221;) would be the same thing. This is wrong. $(&#8220;#&#8230;&#8221;) will return an associative array (object) which is what allows us to change properties of the DOM element. If I am looking to return the reference to the DOM element alone in jQuery, then you need to use $(&#8220;#&#8230;&#8221;).get(0) which will return the first instance of that object. The zero is important because .get() return an array. So if you have more than one instance of what you are looking for, you can target a specific instance of it.</p>
<p>If you can&#8217;t bring yourself to use .get() you can also use $(&#8220;#&#8230;&#8221;)[0] which would do the same thing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.witheringtree.com/index.php/2010/04/objectid-document-getelementbyidobjectid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Load Event Binding With IE Using jQuery</title>
		<link>http://www.witheringtree.com/index.php/2009/05/image-load-event-binding-with-ie-using-jquery/</link>
		<comments>http://www.witheringtree.com/index.php/2009/05/image-load-event-binding-with-ie-using-jquery/#comments</comments>
		<pubDate>Sat, 30 May 2009 04:08:45 +0000</pubDate>
		<dc:creator>David Freerksen</dc:creator>
				<category><![CDATA[IE]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.witheringtree.com/?p=107</guid>
		<description><![CDATA[I ran into a strange issue today. I wrote a plugin for jQuery that used the load events from jQuery attached to an image. This plugin worked perfectly in Firefox, Safari, and Opera on PC, Mac, and Ubuntu. The only browser that it had problems with was IE.
I know. Completely unheard of right? I mean [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a strange issue today. I wrote a plugin for jQuery that used the load events from jQuery attached to an image. This plugin worked perfectly in Firefox, Safari, and Opera on PC, Mac, and Ubuntu. The only browser that it had problems with was IE.</p>
<p>I know. Completely unheard of right? I mean Internet Explorer is the best browser ever. Everything works perfectly in IE. (In case you didn&#8217;t catch that, that was sarcasm)</p>
<p>What the plugin was doing was creating an image element and adding it to the DOM. Once the image was added to the DOM I added the load event to it. The problem was that IE would only see the load event maybe 10% of the time at best. The only way I could get it to work in IE was add the image element to the DOM but don&#8217;t give it a src. Once the image element was added to the DOM, I created the load event listener. Once the load even was created, then I went back to the image and gave it an src.</p>
<p>This was an issue only on images with a smaller file size. The larger images didn&#8217;t seem to have as big of an issue with it except when I was testing locally. However, even the larger images weren&#8217;t consistently calling the load event.</p>
<p>Hopefully this helps out someone else. This drove me nuts for about an hour.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.witheringtree.com/index.php/2009/05/image-load-event-binding-with-ie-using-jquery/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>XML Namespaces With jQuery (Solved)</title>
		<link>http://www.witheringtree.com/index.php/2009/05/xml-namespaces-with-jquery-solved/</link>
		<comments>http://www.witheringtree.com/index.php/2009/05/xml-namespaces-with-jquery-solved/#comments</comments>
		<pubDate>Mon, 04 May 2009 15:52:50 +0000</pubDate>
		<dc:creator>David Freerksen</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.witheringtree.com/?p=273</guid>
		<description><![CDATA[If you have come to this post, you are in the same situation I was in. Many Javascript/AJAX framesworks like jQuery do not work with XML namespaces. I came upon an instance at work where I needed to display data from an RSS feed from Zoho Creator. Part of the problem was some of the [...]]]></description>
			<content:encoded><![CDATA[<p>If you have come to this post, you are in the same situation I was in. Many Javascript/AJAX framesworks like <a href="http://jquery.com" target="_blank">jQuery</a> do not work with XML namespaces. I came upon an instance at work where I needed to display data from an RSS feed from <a href="http://creator.zoho.com/" target="_blank">Zoho Creator</a>. Part of the problem was some of the nodes had default namespaces and others had custom namespaces. I needed to access the data in the custom namespaces and it just wouldn’t work in Firefox or IE. It worked just fine in Safari.</p>
<p>This is a sample output of the RSS feed from Zoho with the data replaced with dots:</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243; ?&gt;<br />
&lt;rss version=&#8221;2.0&#8243; xmlns:zc=&#8221;http://creator.zoho.com/rss/&#8221;&gt;<br />
<span style="white-space: pre;"> </span>&lt;channel&gt;<br />
<span style="white-space: pre;"> </span>&lt;title&gt;…&lt;/title&gt;<br />
<span style="white-space: pre;"> </span>&lt;link&gt;…&lt;/link&gt;<br />
<span style="white-space: pre;"> </span>…<br />
<span style="white-space: pre;"> </span>&lt;item&gt;<br />
<span style="white-space: pre;"> </span>&lt;title&gt;…&lt;/title&gt;<br />
<span style="white-space: pre;"> </span>&lt;link&gt;…link&gt;<br />
<span style="white-space: pre;"> </span>&lt;description&gt;…&lt;/description&gt;<br />
<span style="white-space: pre;"> </span>&lt;guid isPermaLink=&#8221;true&#8221;&gt;…&lt;/guid&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:image&gt;…&lt;/zc:image&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:location&gt;…&lt;/zc:location&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:startdate&gt;…&lt;/zc:startdate&gt;<br />
<span style="white-space: pre;"> </span>&lt;zc:enddate&gt;…&lt;/zc:enddate&gt;<br />
<span style="white-space: pre;"> </span>&lt;/item&gt;<br />
<span style="white-space: pre;"> </span>…<br />
<span style="white-space: pre;"> </span>&lt;/channel&gt;<br />
&lt;/rss&gt;</p>
<p>What I was doing with jQuery was looping over the “item” nodes using the jQuery <span style="font-style: italic;">each()</span> method as such:</p>
<p>var items = $(data).find(&#8220;item&#8221;);<br />
jQuery.each(items, function(i)<br />
{<br />
<span style="white-space: pre;"> </span>alert($(this).find(&#8220;location&#8221;).text())<br />
});</p>
<p>The problem was that this only worked in Safari. In Firefox and IE nothing was returned. Firefox and IE don’t like the custom namespaces. The only way I have found to get this to work is to use this method:</p>
<p>var items = $(data).find(&#8220;item&#8221;);<br />
jQuery.each(items, function(i)<br />
{<br />
<span style="white-space: pre;"> </span>alert($(this).find(&#8220;[@nodeName=zc:location]&#8220;).text())<br />
});</p>
]]></content:encoded>
			<wfw:commentRss>http://www.witheringtree.com/index.php/2009/05/xml-namespaces-with-jquery-solved/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
