jQuery Remove style attributes from ALL elements

前端 未结 7 529
挽巷
挽巷 2020-12-29 07:52

I know how to remove attribute from a single element, there are already some posts about that:

$(\"div.preview\").removeAttr(\"style\");

Th

相关标签:
7条回答
  • 2020-12-29 08:21

    You could try this

    $("div.preview").find('*').removeAttr("style");
    

    To remove style from all child elements of div.preview

    0 讨论(0)
提交回复
热议问题