Removing all dynamic 'data attributes' of an Element [duplicate]
问题 This question already has answers here : Remove multiple html5 data-attributes with jquery (7 answers) Closed 6 years ago . I have a div where dynamic data- attributes get added on some tags. (name of data- attributes to be generated dynamically by script, so there is no way my script will know the NAME of data-attribute) <div data-1223="some data" data-209329="some data" data-dog="some value"> </div> Now, I want to write a code in which it resets the div by removing all the data attributes