Last active
January 27, 2017 08:58
-
-
Save mariadanieldeepak/1af19562f63df3ea86e586808f2ae7b7 to your computer and use it in GitHub Desktop.
02: Add/remove multiple attributes using jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( 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