Find file
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (17 sloc) 455 Bytes
title layout author authorurl
changeTheClass, with bonus IE workaround
post
James

I'll let this one speak for itself:

{% highlight javascript %} function changeTheClass(theElement, theClass) { if(document.getElementById(theElement)) { document.getElementById(theElement).setAttribute('class',theClass); document.getElementById(theElement).setAttribute("className",theClass); //IE workaround } } {% endhighlight %}