Removing data attributes from HTML using jQuery

后端 未结 4 1323
终归单人心
终归单人心 2021-02-14 13:10

Can\'t seem to get this one to work...

I have a page that hides certain links. When the DOM is loaded, I\'m using jQuery to toggle some of those elements. This is drive

4条回答
  •  遇见更好的自我
    2021-02-14 13:37

    Set it to a blank string:

    $(this).attr("data-usr", "");
    

    I second what Kolink said: check the DOM, not the source. (Chrome: Ctrl + Shift + i).

提交回复
热议问题