How to remove width attribute which is under style attribute using jQuery?

前端 未结 7 1449
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 12:40
TEST TEXT

How to remove width attr

7条回答
  •  南旧
    南旧 (楼主)
    2021-02-01 13:07

    Don't use inline styles. Use classes.

    $(".views").removeClass("a");
    $(".views").addClass("b");
    

    But if you really want to, you could do the following:

    $(".views").css("width", "");
    

提交回复
热议问题