176
rated 0 times
[
179]
[
3]
/ answers: 1 / hits: 16648
/ 12 Years ago, thu, july 12, 2012, 12:00:00
Morning,
Is there a wildcard i can use in jQuery which would remove a class from an element?
I am applying new classes to my info message box, if a users click it once, then clicks it again it is adding the new class, but retains the existing class.
I need to remove the previous class, then add the new class for styling. Any ideas?
<div id=infoMsg style=display: block; class=er-green er-red>All submitted feeds are complete.</div>
As you can see the original class was er-green, it has then added er-red.
More From » jquery