Change the style of an entire CSS class using javascript

前端 未结 8 967
灰色年华
灰色年华 2020-11-29 09:19

Is there a way to change an attribute of a CSS class using javascript?


and change the class of

to foolnone.

Otherwise, you'd have to go through each of the children of

and change the class. If that's the way you want to go, probably probably best to use some library, such as jquery. With it, you can do something like: