Skip to content

Instantly share code, notes, and snippets.

@mariadanieldeepak
Last active January 27, 2017 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariadanieldeepak/1af19562f63df3ea86e586808f2ae7b7 to your computer and use it in GitHub Desktop.
Save mariadanieldeepak/1af19562f63df3ea86e586808f2ae7b7 to your computer and use it in GitHub Desktop.
02: Add/remove multiple attributes using jQuery
$( document ).ready(function() {
// Remove multiple attributes
$( 'input.multiple-attr-remove' ).removeAttr( 'id name' );
// Add multiple attributes
$( 'input.multiple-attr-add' ).attr( {'id': 'useremail', 'name': 'useremail' } );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment