<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/className</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 23 May 2013 03:33:30 GMT</pubDate>
<item>
<title>(PHP) CakePHP current Model className - jpsirois</title>
<link>http://snipplr.com/view/17286/cakephp-current-model-classname/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 21 Jul 2009 11:22:55 GMT</pubDate>
<guid>http://snipplr.com/view/17286/cakephp-current-model-classname/</guid>
</item>
<item>
<title>(JavaScript) toggle classnames on a DOM element (supports multiple classnames) - noah</title>
<link>http://snipplr.com/view/3338/toggle-classnames-on-a-dom-element-supports-multiple-classnames/</link>
<description><![CDATA[ <p># Example
Assuming some element like 

     < span id="foo" class="bar homer marge"  >

Then switch `#foo` back and forth between class names as follows.  Note that doing so does not destroy the other classnames that are attached to `#foo`.

     toggleClassname($('#foo')[0], 'bar', 'baz');

If this is applied to an element that does not have the classname `bar` then that classname will be added.

There is also a jQuery version of [toggle class name and replace classname.](http://github.com/textarcana/jquery_plugins)</p> ]]></description>
<pubDate>Fri, 20 Jul 2007 19:15:59 GMT</pubDate>
<guid>http://snipplr.com/view/3338/toggle-classnames-on-a-dom-element-supports-multiple-classnames/</guid>
</item>
<item>
<title>(JavaScript) Kruse's hasClass - noah</title>
<link>http://snipplr.com/view/3337/kruses-hasclass/</link>
<description><![CDATA[ <p>This Matt Kruse's hasClass function.</p> ]]></description>
<pubDate>Fri, 20 Jul 2007 19:06:22 GMT</pubDate>
<guid>http://snipplr.com/view/3337/kruses-hasclass/</guid>
</item>
<item>
<title>(JavaScript) class and className - Todd</title>
<link>http://snipplr.com/view/2368/class-and-classname/</link>
<description><![CDATA[ <p>One notorious discrepancy between IE and Firefox (or other "good" browsers) is the way they access the class HTML attribute. While I've used more complicated solutions in the past, this simple solution doesn't require any browser detection or even a function to set the class attribute that is used. Click the URL above for an explanation of how it works (see the comment by "penders").</p> ]]></description>
<pubDate>Tue, 20 Mar 2007 13:07:50 GMT</pubDate>
<guid>http://snipplr.com/view/2368/class-and-classname/</guid>
</item>
</channel>
</rss>