Add to a css class using JQuery

后端 未结 6 2211
不知归路
不知归路 2020-12-11 03:14

Is it possible to add/update a css class using JQuery.

I know I can add css to a DOM element using this add css rule using jquery, but I would like to add/remove fro

6条回答
  •  情深已故
    2020-12-11 03:57

    You cannot directly update the CSS classes in a separate css file with jQuery. You could however create a ').appendTo('body');

    When updating a CSS class, you'll need to take care the cascading order. Otherwise, it may not turn out to be the effect you are after.

提交回复
热议问题