Skip to content

Instantly share code, notes, and snippets.

@melvinstanly
Last active January 23, 2019 11:38
Show Gist options
  • Save melvinstanly/1f97ac74c21d9950249086f4d15061ff to your computer and use it in GitHub Desktop.
Save melvinstanly/1f97ac74c21d9950249086f4d15061ff to your computer and use it in GitHub Desktop.
html data attribute manipulation function
// Remove all data attributes of an element
$.each( $("element-selected").data(), function(i){
$("div").removeAttr("data-" + i);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment