...

View Full Version : How do you removeClass from children?



Gardy
07-15-2011, 04:49 PM
Hey all,

I have a dropdown (id='job-roles'), and I would like to remove a class from all of the options in the dropdown when certain conditions are met, but I cannot figure out how to do it. Is anyone able to help please?

Thanks.

abduraooft
07-15-2011, 05:02 PM
this.className=this.className.replace(new RegExp(" myclass\\b"), "");
(Just copied from http://htmldog.com/articles/suckerfish/dropdowns/ :))



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum