jQuery – enable/disable all style sheets on page on click

后端 未结 6 1192
情书的邮戳
情书的邮戳 2020-12-06 06:05

Is it possible to detect all style sheets on the current page with a click of a ‘disable/enable CSS’ button and disable them on the first click so none of the styling applie

6条回答
  •  抹茶落季
    2020-12-06 06:33

    I found the found the following worked in all browsers for me:

    CSS Link:
    
    
    JQuery:
    $('link[data-role="baseline"]').attr('href', '');
    

    The above will disable only that one stylesheet, and this could be toggled on and off.

提交回复
热议问题