jQuery Remove style attributes from ALL elements

前端 未结 7 531
挽巷
挽巷 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

提交回复
热议问题