<?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: Using jQuery to change part of the className attribute</title>
	<atom:link href="http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/</link>
	<description>My thoughts on ColdFusion, Flex and other RIA stuff....</description>
	<lastBuildDate>Wed, 08 Feb 2012 01:51:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: biswajit</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-6522</link>
		<dc:creator>biswajit</dc:creator>
		<pubDate>Thu, 03 Feb 2011 07:48:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-6522</guid>
		<description>You can&#039;t use same id twice in a single page.</description>
		<content:encoded><![CDATA[<p>You can&#8217;t use same id twice in a single page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: biswajit</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-6520</link>
		<dc:creator>biswajit</dc:creator>
		<pubDate>Thu, 03 Feb 2011 07:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-6520</guid>
		<description>Ideas are great ...</description>
		<content:encoded><![CDATA[<p>Ideas are great &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-5794</link>
		<dc:creator>Satya</dc:creator>
		<pubDate>Sun, 14 Nov 2010 08:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-5794</guid>
		<description>looks  good ,  but not working with many div&#039;s with same id&#039;s .</description>
		<content:encoded><![CDATA[<p>looks  good ,  but not working with many div&#8217;s with same id&#8217;s .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ilanlar</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-5302</link>
		<dc:creator>ilanlar</dc:creator>
		<pubDate>Wed, 01 Sep 2010 17:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-5302</guid>
		<description>thanks, but did not help me</description>
		<content:encoded><![CDATA[<p>thanks, but did not help me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3296</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Tue, 14 Apr 2009 08:03:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3296</guid>
		<description>@Rachel,

I actually did look at hasClass() but because I had to change only a part of the className and not the full className, I had to use string replacement instead. Also, because I was changing more than one div&#039;s, I had to use find() instead of hasClass(). However, I understand that it would make sense to use hasClass() if it was a different scenario than in my example abobe.</description>
		<content:encoded><![CDATA[<p>@Rachel,</p>
<p>I actually did look at hasClass() but because I had to change only a part of the className and not the full className, I had to use string replacement instead. Also, because I was changing more than one div&#8217;s, I had to use find() instead of hasClass(). However, I understand that it would make sense to use hasClass() if it was a different scenario than in my example abobe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rachel Lehman</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3293</link>
		<dc:creator>Rachel Lehman</dc:creator>
		<pubDate>Sun, 12 Apr 2009 19:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3293</guid>
		<description>Have you looked into jQuery&#039;s hasClass(), addClass() and removeClass()? They all do basically what they sound like and might be useful for your situation so you don&#039;t have to parse the classname string.</description>
		<content:encoded><![CDATA[<p>Have you looked into jQuery&#8217;s hasClass(), addClass() and removeClass()? They all do basically what they sound like and might be useful for your situation so you don&#8217;t have to parse the classname string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anuj Gakhar</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3284</link>
		<dc:creator>Anuj Gakhar</dc:creator>
		<pubDate>Wed, 08 Apr 2009 14:56:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3284</guid>
		<description>@Dan, thanks for the suggestion. I would have done so if it was applicable in the app I am working. The actual piece of code is far more complex than this block of code I posted here (just for this blog post). But I would agree that would make more sense if it was applicable.</description>
		<content:encoded><![CDATA[<p>@Dan, thanks for the suggestion. I would have done so if it was applicable in the app I am working. The actual piece of code is far more complex than this block of code I posted here (just for this blog post). But I would agree that would make more sense if it was applicable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan G. Switzer, II</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3283</link>
		<dc:creator>Dan G. Switzer, II</dc:creator>
		<pubDate>Wed, 08 Apr 2009 14:48:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3283</guid>
		<description>One more time!

&lt;li class=&quot;my-tabs&quot;&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;div class=&quot;boxes grey-box&quot;&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;div class=&#039;boxes-top-left boxes blue&#039;/&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;div class=&quot;boxes&quot;/&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;div class=&quot;boxes-bottom-left boxes blue&quot;/&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;/div&gt;  
&amp;nsbp;&amp;nsbp;&amp;nsbp;&amp;nsbp;&lt;a href=&quot;&quot;&gt;Tab 1&lt;/a&gt;  
&lt;/li&gt;  

(Sorry about the three posts!)</description>
		<content:encoded><![CDATA[<p>One more time!</p>
<p>&lt;li class=&#8221;my-tabs&#8221;&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&lt;div class=&#8221;boxes grey-box&#8221;&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&lt;div class=&#8217;boxes-top-left boxes blue&#8217;/&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&lt;div class=&#8221;boxes&#8221;/&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&nsbp;&lt;div class=&#8221;boxes-bottom-left boxes blue&#8221;/&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&lt;/div&gt;<br />
&nsbp;&nsbp;&nsbp;&nsbp;&lt;a href=&#8221;"&gt;Tab 1&lt;/a&gt;<br />
&lt;/li&gt;  </p>
<p>(Sorry about the three posts!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan G. Switzer, II</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3282</link>
		<dc:creator>Dan G. Switzer, II</dc:creator>
		<pubDate>Wed, 08 Apr 2009 14:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3282</guid>
		<description>Apparently my code in the last post wasn&#039;t escaped, so here it is in HTML format:

&lt;li class=&quot;my-tabs&quot;&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&quot;boxes grey-box&quot;&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&#039;boxes-top-left boxes blue&#039;/&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&quot;boxes&quot;/&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&quot;boxes-bottom-left boxes blue&quot;/&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;&lt;/div&gt;  
	nsbp;	nsbp;	nsbp;	nsbp;&lt;a href=&quot;&quot;&gt;Tab 1&lt;/a&gt;  
&lt;/li&gt;</description>
		<content:encoded><![CDATA[<p>Apparently my code in the last post wasn&#8217;t escaped, so here it is in HTML format:</p>
<p>&lt;li class=&#8221;my-tabs&#8221;&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&#8221;boxes grey-box&#8221;&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&#8217;boxes-top-left boxes blue&#8217;/&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&#8221;boxes&#8221;/&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;	nsbp;&lt;div class=&#8221;boxes-bottom-left boxes blue&#8221;/&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;&lt;/div&gt;<br />
	nsbp;	nsbp;	nsbp;	nsbp;&lt;a href=&#8221;"&gt;Tab 1&lt;/a&gt;<br />
&lt;/li&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan G. Switzer, II</title>
		<link>http://www.anujgakhar.com/2009/04/08/using-jquery-to-change-part-of-the-classname-attribute/comment-page-1/#comment-3281</link>
		<dc:creator>Dan G. Switzer, II</dc:creator>
		<pubDate>Wed, 08 Apr 2009 14:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/?p=406#comment-3281</guid>
		<description>@Anuj:

This might not be possible with your current framework, but if possible I&#039;d rework the CSS a bit and do something like:

  
	  
		  
		  
		  
	  
	&lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;Tab 1&lt;/a&gt;  
  

And then instead of defining classes for &quot;.grey-top-left&quot; and &quot;.grey-bottom-left&quot;, you would do &quot;.grey-box .boxes-top-left&quot; and &quot;.grey-box .boxes-bottom-left&quot; and so forth.

The benefit to this is then you only need to change the one CSS class to affect all of your elements.</description>
		<content:encoded><![CDATA[<p>@Anuj:</p>
<p>This might not be possible with your current framework, but if possible I&#8217;d rework the CSS a bit and do something like:</p>
<p>	<a href="" rel="nofollow">Tab 1</a>  </p>
<p>And then instead of defining classes for &#8220;.grey-top-left&#8221; and &#8220;.grey-bottom-left&#8221;, you would do &#8220;.grey-box .boxes-top-left&#8221; and &#8220;.grey-box .boxes-bottom-left&#8221; and so forth.</p>
<p>The benefit to this is then you only need to change the one CSS class to affect all of your elements.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

