<?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 add or remove class with toggleClass</title>
	<atom:link href="http://jqueryminute.com/jquery-add-or-remove-class-with-toggleclass/feed/" rel="self" type="application/rss+xml" />
	<link>http://jqueryminute.com/jquery-add-or-remove-class-with-toggleclass/</link>
	<description>...a jQuery Minute™ later and you&#039;re done!</description>
	<lastBuildDate>Fri, 09 Apr 2010 22:13:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eyveneena</title>
		<link>http://jqueryminute.com/jquery-add-or-remove-class-with-toggleclass/comment-page-1/#comment-337</link>
		<dc:creator>Eyveneena</dc:creator>
		<pubDate>Wed, 18 Nov 2009 12:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://jqueryminute.com/?p=44#comment-337</guid>
		<description>Hi Jonathan,

     I have a set of thumbnails that when the client hovers over each one it has a border that lights up and when they remove the mouse it is not lit.  With this code they do not light up whenever I mouse over one and they do not light up when I remove the mouse from &quot;one&quot;.  I tried the upper code but it wouldnt work for me.

      Here is the code I implemented:

&lt;pre&gt;&lt;code&gt;

$(element).each(function() {

                $(element).hover(function() {

                    

                    $(element).toggleClass(&#039;lit&#039;, $(element).hasClass(&#039;notLit&#039;) );



                }, function() {

                    $(element).removeClass(&#039;lit&#039;);

                });



            });

        };
&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>     I have a set of thumbnails that when the client hovers over each one it has a border that lights up and when they remove the mouse it is not lit.  With this code they do not light up whenever I mouse over one and they do not light up when I remove the mouse from &#8220;one&#8221;.  I tried the upper code but it wouldnt work for me.</p>
<p>      Here is the code I implemented:</p>
<pre><code>

$(element).each(function() {

                $(element).hover(function() {

                    $(element).toggleClass('lit', $(element).hasClass('notLit') );

                }, function() {

                    $(element).removeClass('lit');

                });

            });

        };
</code></pre>
]]></content:encoded>
	</item>
</channel>
</rss>
