How do I unset an element's CSS attribute using jQuery?

前端 未结 6 1840
北海茫月
北海茫月 2020-12-05 03:30

If I set a CSS value on a specific element using:

$(\'#element\').css(\'background-color\', \'#ccc\');

I want to be able to unset that elem

6条回答
  •  时光取名叫无心
    2020-12-05 04:18

    Actually, the syntax I thought was incorrect (with null) seems to be working -- my selector was just improperly formed, and thus yielding no elements. D'oh!

提交回复
热议问题