<?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>Code That Matters &#187; jQuery</title>
	<atom:link href="http://www.codethatmatters.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codethatmatters.com</link>
	<description>Pylons, rails, jQuery and other stuff that matters</description>
	<lastBuildDate>Sat, 16 Jul 2011 10:57:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DiaProjector &#8211; a jQuery diapositive slideshow plugin</title>
		<link>http://www.codethatmatters.com/2010/09/diaprojector-a-jquery-diapositive-slideshow-plugin/</link>
		<comments>http://www.codethatmatters.com/2010/09/diaprojector-a-jquery-diapositive-slideshow-plugin/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 11:40:20 +0000</pubDate>
		<dc:creator>bjorn</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[diaprojector]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[slideshow]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=207</guid>
		<description><![CDATA[UPDATE: Version 1.1 available! Sept 21, 2010
- Overlay prev/next buttons available. This option, &#8220;overlay&#8221;, is true by default.
- Some small bugfixes
- Clearer left and right keybuttons in the navigation box
Lightboxes, Liteboxes, Greyboxes and Fancyboxes, we have seen them all by now and they all work kind of well. However, they are not very original and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: Version 1.1 available! </strong><em>Sept 21, 2010</em><br />
- Overlay prev/next buttons available. This option, &#8220;overlay&#8221;, is true by default.<br />
- Some small bugfixes<br />
- Clearer left and right keybuttons in the navigation box</p>
<p>Lightboxes, Liteboxes, Greyboxes and Fancyboxes, we have seen them all by now and they all work kind of well. However, they are not very original and work in pretty much the same way. If you want something new and original, yet still oldschool and simple, say hello to the latest addition to the slideshow plugins &#8211; DiaProjector.</p>
<p>Remember watching photos with the help of <a href="http://ss11i01.stream.ip-only.net/images/blog/images/entries/43/45/39/2862/36f53b65b0c392a9" target="_blank">these slides</a>? All you needed was a screen, a diaprojector machine and a ton of slides and you were in for hours of fun with your friends or family. This neat jQuery plugin is almost as fun! At least it&#8217;s trying to be, simulating the very same old fuzzy diaprojector feeling. Try it out here on our site and then download it to use on your own site. Please drop a line here when you have it running or have some questions/comments <img src='http://www.codethatmatters.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><img class="size-full wp-image-210 aligncenter" title="DiaProjector Jquery Plugin" usemap="#imagemap" src="http://www.codethatmatters.com/wp-content/uploads/2010/08/diaprojectorplugin.jpg" alt="DiaProjector - world's only diapositive slideshow" width="490" height="500" /></p>
<map name="imagemap">
<area title="Download DiaProjector" shape="rect" coords="238,254,410,303" href="http://source.codethatmatters.com/DiaProjector/diaprojector.zip" />
<area title="Watch it in action!" shape="rect" coords="81,254,226,303" href="http://source.codethatmatters.com/DiaProjector/index.html" target="_blank" /> </map>
<p>The plugin should work in Internet Explorer 7+, Firefox, Opera and Safari.</p>
<p>Sites that are using the script at the moment are:<br />
- <a href="http://www.monkeyagency.com/portfolio/" target="_blank">Monkey Agency</a></p>
<p> <img src='http://www.codethatmatters.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2010/09/diaprojector-a-jquery-diapositive-slideshow-plugin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Check if an element exists in the DOM with jQuery</title>
		<link>http://www.codethatmatters.com/2010/04/check-if-an-element-exists-in-the-dom-with-jquery/</link>
		<comments>http://www.codethatmatters.com/2010/04/check-if-an-element-exists-in-the-dom-with-jquery/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 19:17:14 +0000</pubDate>
		<dc:creator>jorgen</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[exists]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=192</guid>
		<description><![CDATA[Need to check if an element exists in the page you have loaded using jQuery. It is very simple. The jQuery object encapsulates zero or more DOM elements, and allows us to interact with them in many different ways. Therefor, we can just use the length property to check if our jQuery object, that is [...]]]></description>
			<content:encoded><![CDATA[<p>Need to check if an element exists in the page you have loaded using jQuery. It is very simple. The jQuery object encapsulates zero or more DOM elements, and allows us to interact with them in many different ways. Therefor, we can just use the length property to check if our jQuery object, that is returned by our selector query has one or several DOM elements attached to it.</p>
<p>Check if a specific element exists based on ID.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">if</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'#my-element'</span><span class="br0">&#41;</span>.<span class="me1">length</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Action code goes here</span>
<span class="br0">&#125;</span></pre></div></div>

<p>Check if a specific or several elements exists based on CLASS.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">if</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'.my-element'</span><span class="br0">&#41;</span>.<span class="me1">length</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Elment found</span>
<span class="br0">&#125;</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">if</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'.my-element'</span><span class="br0">&#41;</span>.<span class="me1">length</span> <span class="sy0">!=</span> <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Elements found</span>
<span class="br0">&#125;</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span class="kw1">if</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">'.my-element'</span><span class="br0">&#41;</span>.<span class="me1">length</span> <span class="sy0">&gt;</span> <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// Elements found</span>
<span class="br0">&#125;</span></pre></div></div>

<p>Remy Sharp have written an excellent post and recorded a screencast that explains this further on <a href="http://jqueryfordesigners.com/element-exists/">jQuery for Designers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2010/04/check-if-an-element-exists-in-the-dom-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery image selector Facebook style</title>
		<link>http://www.codethatmatters.com/2010/02/jquery-image-selector-facebook-style/</link>
		<comments>http://www.codethatmatters.com/2010/02/jquery-image-selector-facebook-style/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:34:49 +0000</pubDate>
		<dc:creator>bjorn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=179</guid>
		<description><![CDATA[In late 2008, the guys over at emposha wrote an excellent image selector for jQuery. It works very similar to the friend chooser on Facebook. However, I wanted a way to limit the selections to only one friend/picture. With the current code there is no such possibility. So instead of complaining, I simply rewrote some [...]]]></description>
			<content:encoded><![CDATA[<p>In late 2008, the guys over at <a href="http://www.emposha.com/">emposha</a> wrote an excellent <a href="http://www.emposha.com/javascript/fcbklistselection-like-facebook-friends-selector.html">image selector for jQuery</a>. It works very similar to the friend chooser on <a href="http://www.facebook.com">Facebook</a>. However, I wanted a way to limit the selections to only one friend/picture. With the current code there is no such possibility. So instead of complaining, I simply rewrote some lines in the script. If you want to do the same thing, this is how you do it.</p>
<p>Row 80-84 in &#8220;fcbklistselection.js&#8221; looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">obj.<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        addToSelected<span class="br0">&#40;</span>obj<span class="br0">&#41;</span><span class="sy0">;</span>                            
        obj.<span class="me1">toggleClass</span><span class="br0">&#40;</span><span class="st0">&quot;itemselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
        obj.<span class="me1">parents</span><span class="br0">&#40;</span><span class="st0">&quot;li&quot;</span><span class="br0">&#41;</span>.<span class="me1">toggleClass</span><span class="br0">&#40;</span><span class="st0">&quot;liselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>                     
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>Replace these lines with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">obj.<span class="me1">click</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
       <span class="co1">//check if this is already selected. in that case it should be deselected</span>
       deselect_this <span class="sy0">=</span> <span class="kw2">false</span><span class="sy0">;</span>
       <span class="kw1">if</span><span class="br0">&#40;</span>parseInt<span class="br0">&#40;</span>obj.<span class="me1">attr</span><span class="br0">&#40;</span><span class="st0">&quot;class&quot;</span><span class="br0">&#41;</span>.<span class="me1">indexOf</span><span class="br0">&#40;</span><span class="st0">&quot;selected&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="sy0">&gt;</span> <span class="sy0">-</span><span class="nu0">1</span><span class="br0">&#41;</span> deselect_this <span class="sy0">=</span> <span class="kw2">true</span><span class="sy0">;</span>
&nbsp;
       <span class="co1">//deselecting all items</span>
       $<span class="br0">&#40;</span><span class="st0">&quot;li .fcbklist_item&quot;</span><span class="br0">&#41;</span>.<span class="me1">each</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span>x<span class="sy0">,</span> obj2<span class="br0">&#41;</span> <span class="br0">&#123;</span>
              obj2 <span class="sy0">=</span> $<span class="br0">&#40;</span>obj2<span class="br0">&#41;</span><span class="sy0">;</span>
              obj2.<span class="me1">removeClass</span><span class="br0">&#40;</span><span class="st0">&quot;itemselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span> 
              obj2.<span class="me1">parents</span><span class="br0">&#40;</span><span class="st0">&quot;li&quot;</span><span class="br0">&#41;</span>.<span class="me1">removeClass</span><span class="br0">&#40;</span><span class="st0">&quot;liselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
              obj2.<span class="me1">parents</span><span class="br0">&#40;</span><span class="st0">&quot;li&quot;</span><span class="br0">&#41;</span>.<span class="me1">removeAttr</span><span class="br0">&#40;</span><span class="st0">&quot;addedid&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
              removeValue<span class="br0">&#40;</span>obj2<span class="br0">&#41;</span><span class="sy0">;</span>
              hiddenCheck<span class="br0">&#40;</span>obj2<span class="br0">&#41;</span><span class="sy0">;</span>
       <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
       <span class="co1">//if the clicked item should be deselected, do so</span>
       <span class="kw1">if</span><span class="br0">&#40;</span><span class="sy0">!</span>deselect_this<span class="br0">&#41;</span>
       <span class="br0">&#123;</span>
              addToSelected<span class="br0">&#40;</span>obj<span class="br0">&#41;</span><span class="sy0">;</span>                            
              obj.<span class="me1">toggleClass</span><span class="br0">&#40;</span><span class="st0">&quot;itemselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
              obj.<span class="me1">parents</span><span class="br0">&#40;</span><span class="st0">&quot;li&quot;</span><span class="br0">&#41;</span>.<span class="me1">toggleClass</span><span class="br0">&#40;</span><span class="st0">&quot;liselected&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span>
       <span class="br0">&#125;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

<p>To get rid of the selected/unselected, simply add &#8220;display: none;&#8221; below &#8220;#filters .selections&#8221; in the css file (fcbklistselection.css). Enjoy!</p>
<p>Original demo: <a href="http://www.emposha.com/demo/fcbklistselection/">http://www.emposha.com/demo/fcbklistselection/</a><br />
Demo with our solution: <a href="http://www.codethatmatters.com/source/fcbkListSelection/">http://www.codethatmatters.com/source/fcbkListSelection/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2010/02/jquery-image-selector-facebook-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Load that DOM, please. Thank you!</title>
		<link>http://www.codethatmatters.com/2010/01/load-that-dom-please-thank-you/</link>
		<comments>http://www.codethatmatters.com/2010/01/load-that-dom-please-thank-you/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 22:33:47 +0000</pubDate>
		<dc:creator>jorgen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dojo]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[YUI3]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=167</guid>
		<description><![CDATA[Get started with 5 different JavaScript frameworks and how they handle DOM readiness. 
Frequently there is talk about to check if the DOM is loaded or not when using JavaScript today. There is quite a few ways to do this and it is an interesting story to read up about the origin of &#8220;DOM ready&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Get started with 5 different JavaScript frameworks and how they handle DOM readiness. </strong></p>
<p>Frequently there is talk about to check if the DOM is loaded or not when using JavaScript today. There is quite a few ways to do this and it is an interesting story to read up about the origin of &#8220;DOM ready&#8221;. We should just be thankful that we don&#8217;t have to think about this on a everyday basis and that guys like John Resig does what he does and just hands it over to us. So we can play with it and build businesses around it. Thank you all JavaScript framework creators and contributors.</p>
<p>There is a whole bunch of great JavaScript frameworks and libraries out there, with various specialities and pros and cons. I mainly use jQuery, Prototype and sometimes I play with YUI. jQuery and Prototype aren&#8217;t that different from each other on a high level and easy to get started with. YUI on the other hand requires a bit of more knowledge and works a bit different. Despite your choice of JavaScript framework, there is one thing that we all want to know when getting started with one. How to check if the DOM is loaded.</p>
<p>We&#8217;ll look at how to check if the DOM is loaded in five different JavaScript frameworks; Dojo, jQuery, MooTools, Prototype and YUI 3. First out is Dojo.</p>
<p><strong>DOM readiness in Dojo</strong><br />
Learn more about Dojo&#8217;s <a href="http://api.dojotoolkit.org/jsdoc/1.3.2/dojo.addOnLoad">addOnLoad</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">dojo.<span class="me1">addOnLoad</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
    <span class="co1">// The DOM is ready, lets say hello!</span>
    say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">function</span> say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">'Hello Dojo! DOM is loaded!'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

<p><strong>DOM readiness in jQuery</strong><br />
Learn more about jQuery&#8217;s <a href="http://docs.jquery.com/Events/ready">ready</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span>document<span class="br0">&#41;</span>.<span class="me1">ready</span><span class="br0">&#40;</span><span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// The DOM is ready, lets say hello!</span>
    say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">function</span> say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">'Hello jQuery! DOM is loaded!'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

<p><strong>DOM readiness in MooTools</strong><br />
Learn more about MooTools <a href="http://mootools.net/docs/core/Utilities/DomReady">DomReady</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span class="me1">addEvent</span><span class="br0">&#40;</span><span class="st0">'domready'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// The DOM is ready, lets say hello!</span>
    say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">function</span> say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">'Hello MooTools! DOM is loaded!'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

<p><strong>DOM readiness in Prototype</strong><br />
Learn more about Prototypes <a href="http://api.prototypejs.org/dom/document.html">document observe and loaded</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">document.<span class="me1">observe</span><span class="br0">&#40;</span><span class="st0">&quot;dom:loaded&quot;</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="co1">// The DOM is ready, lets say hello!</span>
    say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">function</span> say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">'Hello Prototype! DOM is loaded!'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

<p><strong>DOM readiness in YUI 3</strong><br />
Learn more about YUI 3&#8217;s <a href="http://developer.yahoo.com/yui/3/event/#ondomready">domready</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">YUI<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="kw2">use</span><span class="br0">&#40;</span><span class="st0">'node'</span><span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>Y<span class="br0">&#41;</span> <span class="br0">&#123;</span>
&nbsp;
    <span class="kw2">function</span> init<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
        <span class="co1">// The DOM is ready, lets say hello!</span>
        say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="br0">&#125;</span>
&nbsp;
     Y.<span class="me1">on</span><span class="br0">&#40;</span><span class="st0">&quot;domready&quot;</span><span class="sy0">,</span> init<span class="br0">&#41;</span><span class="sy0">;</span> 
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span>
&nbsp;
<span class="kw2">function</span> say_hello<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    <span class="kw3">alert</span><span class="br0">&#40;</span><span class="st0">'Hello YUI 3! DOM is loaded!'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2010/01/load-that-dom-please-thank-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Table row highlight on hover using JQuery</title>
		<link>http://www.codethatmatters.com/2009/10/table-row-highlight-on-hover-using-jquery/</link>
		<comments>http://www.codethatmatters.com/2009/10/table-row-highlight-on-hover-using-jquery/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 20:38:43 +0000</pubDate>
		<dc:creator>jorgen</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[front end]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.codethatmatters.com/?p=98</guid>
		<description><![CDATA[It is a shame that IE6 doesn&#8217;t support hover on html elements other than a-tag. The support can be somewhat flakey in other browsers as well. So for make this work we need to use JavaScript and preferably some kind of JavaScript library which in this case is JQuery.
Here is the script in its full [...]]]></description>
			<content:encoded><![CDATA[<p>It is a shame that IE6 doesn&#8217;t support hover on html elements other than a-tag. The support can be somewhat flakey in other browsers as well. So for make this work we need to use JavaScript and preferably some kind of JavaScript library which in this case is JQuery.</p>
<p>Here is the script in its full glory, small and simple. It is assumed that this behaviour should be applied on all tables. You can easily modify the script to access just a single table with a specific ID or CLASS. A neater version would be to wrap the code into its own function that only is called when a certain ID or CLASS exists inside the DOM tree.</p>
<p><a href="http://source.codethatmatters.com/98/">View Table row highlight example</a></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span class="br0">&#40;</span>document<span class="br0">&#41;</span>.<span class="me1">ready</span><span class="br0">&#40;</span><span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
    $<span class="br0">&#40;</span><span class="st0">'tr'</span><span class="br0">&#41;</span>.<span class="me1">hover</span><span class="br0">&#40;</span>
        <span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
            $<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">addClass</span><span class="br0">&#40;</span><span class="st0">'hover'</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="br0">&#125;</span><span class="sy0">,</span>
        <span class="kw2">function</span> <span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
            $<span class="br0">&#40;</span><span class="kw1">this</span><span class="br0">&#41;</span>.<span class="me1">removeClass</span><span class="br0">&#40;</span><span class="st0">'hover'</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="br0">&#125;</span>
    <span class="br0">&#41;</span><span class="sy0">;</span>
    $<span class="br0">&#40;</span><span class="st0">&quot;tr.table-header&quot;</span><span class="br0">&#41;</span>.<span class="me1">unbind</span><span class="br0">&#40;</span><span class="st0">'mouseenter mouseleave'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.codethatmatters.com/2009/10/table-row-highlight-on-hover-using-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

