<?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: .addClass()</title>
	<atom:link href="http://api.jquery.com/addClass/feed/" rel="self" type="application/rss+xml" />
	<link>http://api.jquery.com/addClass/</link>
	<description>jQuery API Reference</description>
	<lastBuildDate>Fri, 19 Aug 2011 09:06:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Ash Singh</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8663</link>
		<dc:creator>Ash Singh</dc:creator>
		<pubDate>Thu, 27 Jan 2011 17:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8663</guid>
		<description>I am trying to add a class to li with similar class for rest of li, on click event, but whenever i do that it does add class for a moment then load the page, I have used the following code.&lt;br&gt;&lt;br&gt;$(&#039;.navLi a&#039;).click(function(){&lt;br&gt;              $(this).addClass(&#039;selected&#039;);&lt;br&gt;});&lt;br&gt;&lt;br&gt;Can Any one help me out.....thanks!!!</description>
		<content:encoded><![CDATA[<p>I am trying to add a class to li with similar class for rest of li, on click event, but whenever i do that it does add class for a moment then load the page, I have used the following code.</p>
<p>$(&#39;.navLi a&#39;).click(function(){<br />              $(this).addClass(&#39;selected&#39;);<br />});</p>
<p>Can Any one help me out&#8230;..thanks!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davidxiaozhi</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8557</link>
		<dc:creator>Davidxiaozhi</dc:creator>
		<pubDate>Mon, 24 Jan 2011 13:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8557</guid>
		<description>I like this demo,it is a nice func.</description>
		<content:encoded><![CDATA[<p>I like this demo,it is a nice func.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dong</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8503</link>
		<dc:creator>Dong</dc:creator>
		<pubDate>Fri, 21 Jan 2011 14:20:14 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8503</guid>
		<description>it&#039;s useful func</description>
		<content:encoded><![CDATA[<p>it&#39;s useful func</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chenru8891</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8311</link>
		<dc:creator>Chenru8891</dc:creator>
		<pubDate>Thu, 13 Jan 2011 11:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8311</guid>
		<description>呵呵 看不懂</description>
		<content:encoded><![CDATA[<p>呵呵 看不懂</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Imrie</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8287</link>
		<dc:creator>Christopher Imrie</dc:creator>
		<pubDate>Wed, 12 Jan 2011 18:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8287</guid>
		<description>great feature</description>
		<content:encoded><![CDATA[<p>great feature</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8231</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Mon, 10 Jan 2011 19:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8231</guid>
		<description>When you call $(&#039;.slide_title_minus&#039;).click(function); jQuery searches for all elements with that class, and tries to assign a click handler to them. However, when that code runs there is no .slide_title_minus, so the event handler is never bound. Look up the jQuery function called live()</description>
		<content:encoded><![CDATA[<p>When you call $(&#39;.slide_title_minus&#39;).click(function); jQuery searches for all elements with that class, and tries to assign a click handler to them. However, when that code runs there is no .slide_title_minus, so the event handler is never bound. Look up the jQuery function called live()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: potogas</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-8210</link>
		<dc:creator>potogas</dc:creator>
		<pubDate>Sun, 09 Jan 2011 01:06:08 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-8210</guid>
		<description>ok</description>
		<content:encoded><![CDATA[<p>ok</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LFA</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-7889</link>
		<dc:creator>LFA</dc:creator>
		<pubDate>Wed, 29 Dec 2010 21:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-7889</guid>
		<description>Hello, i&#039;m trying to switch a class dinamically on a div element but its not working properly. Here&#039;s my code&lt;br&gt;&lt;br&gt; $(&#039;.slide_title_plus&#039;).click(function(){&lt;br&gt;$(this).next(&#039;.slide_content&#039;).slideToggle();&lt;br&gt;$(this).removeClass(&#039;slide_title_plus&#039;);&lt;br&gt;$(this).addClass(&#039;slide_title_minus&#039;);&lt;br&gt;return false;&lt;br&gt; });&lt;br&gt;&lt;br&gt; $(&#039;.slide_title_minus&#039;).click(function(){&lt;br&gt;$(this).next(&#039;.slide_content&#039;).slideToggle();&lt;br&gt;$(this).removeClass(&#039;slide_title_minus&#039;);&lt;br&gt;$(this).addClass(&#039;slide_title_plus&#039;);&lt;br&gt;return false;&lt;br&gt; });&lt;br&gt;&lt;br&gt;When I click a &quot;slide_title_plus&quot; class element, i want it to switch to the &quot;slide_title_minus&quot; class. The first time it works, but then I click on the same switched &quot;slide_title_minus&quot; element and it doesn&#039;t turn back into the first class&lt;br&gt;&lt;br&gt;Any ideas?</description>
		<content:encoded><![CDATA[<p>Hello, i&#39;m trying to switch a class dinamically on a div element but its not working properly. Here&#39;s my code</p>
<p> $(&#39;.slide_title_plus&#39;).click(function(){<br />$(this).next(&#39;.slide_content&#39;).slideToggle();<br />$(this).removeClass(&#39;slide_title_plus&#39;);<br />$(this).addClass(&#39;slide_title_minus&#39;);<br />return false;<br /> });</p>
<p> $(&#39;.slide_title_minus&#39;).click(function(){<br />$(this).next(&#39;.slide_content&#39;).slideToggle();<br />$(this).removeClass(&#39;slide_title_minus&#39;);<br />$(this).addClass(&#39;slide_title_plus&#39;);<br />return false;<br /> });</p>
<p>When I click a &#8220;slide_title_plus&#8221; class element, i want it to switch to the &#8220;slide_title_minus&#8221; class. The first time it works, but then I click on the same switched &#8220;slide_title_minus&#8221; element and it doesn&#39;t turn back into the first class</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LFA</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-7830</link>
		<dc:creator>LFA</dc:creator>
		<pubDate>Wed, 29 Dec 2010 13:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-7830</guid>
		<description>Hello, i&#039;m trying to switch a class dinamically on a div element but its not working properly. Here&#039;s my code&lt;br&gt;&lt;br&gt; $(&#039;.slide_title_plus&#039;).click(function(){&lt;br&gt;$(this).next(&#039;.slide_content&#039;).slideToggle();&lt;br&gt;$(this).removeClass(&#039;slide_title_plus&#039;);&lt;br&gt;$(this).addClass(&#039;slide_title_minus&#039;);&lt;br&gt;return false;&lt;br&gt; });&lt;br&gt;&lt;br&gt; $(&#039;.slide_title_minus&#039;).click(function(){&lt;br&gt;$(this).next(&#039;.slide_content&#039;).slideToggle();&lt;br&gt;$(this).removeClass(&#039;slide_title_minus&#039;);&lt;br&gt;$(this).addClass(&#039;slide_title_plus&#039;);&lt;br&gt;return false;&lt;br&gt; });&lt;br&gt;&lt;br&gt;When I click a &quot;slide_title_plus&quot; class element, i want it to switch to the &quot;slide_title_minus&quot; class. The first time it works, but then I click on the same switched &quot;slide_title_minus&quot; element and it doesn&#039;t turn back into the first class&lt;br&gt;&lt;br&gt;Any ideas?</description>
		<content:encoded><![CDATA[<p>Hello, i&#39;m trying to switch a class dinamically on a div element but its not working properly. Here&#39;s my code</p>
<p> $(&#39;.slide_title_plus&#39;).click(function(){<br />$(this).next(&#39;.slide_content&#39;).slideToggle();<br />$(this).removeClass(&#39;slide_title_plus&#39;);<br />$(this).addClass(&#39;slide_title_minus&#39;);<br />return false;<br /> });</p>
<p> $(&#39;.slide_title_minus&#39;).click(function(){<br />$(this).next(&#39;.slide_content&#39;).slideToggle();<br />$(this).removeClass(&#39;slide_title_minus&#39;);<br />$(this).addClass(&#39;slide_title_plus&#39;);<br />return false;<br /> });</p>
<p>When I click a &#8220;slide_title_plus&#8221; class element, i want it to switch to the &#8220;slide_title_minus&#8221; class. The first time it works, but then I click on the same switched &#8220;slide_title_minus&#8221; element and it doesn&#39;t turn back into the first class</p>
<p>Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lolol232</title>
		<link>http://api.jquery.com/addClass/comment-page-1/#comment-7744</link>
		<dc:creator>Lolol232</dc:creator>
		<pubDate>Thu, 23 Dec 2010 14:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://api.jquery.com/?p=74#comment-7744</guid>
		<description>Your common sense should ideally point that out.</description>
		<content:encoded><![CDATA[<p>Your common sense should ideally point that out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

