How to apply !important using .css()?

后端 未结 30 3564
情深已故
情深已故 2020-11-21 07:06

I am having trouble applying a style that is !important. I’ve tried:

$(\"#elem\").css(\"width\", \"100px          


        
30条回答
  •  春和景丽
    2020-11-21 07:37

    The safest workaround to this is to add a class and then do the magic in CSS :-), addClass() and removeClass() should do the work.

提交回复
热议问题