How can assign multiple css classes to an html element through javascript without using any libraries?
|
|
|||
|
guaranteed to work on new browsers. the old className way may not, since it's deprecated.
|
||||
|
Perhaps:
Not tested, but should work. |
|||
|
Try this:
Similar logic could be used to make a removeClass function. |
|||
|