Method for removing attributes by name.
name
Name of the attribute.
The instance itself.
$('.pear').removeAttr('class').prop('outerHTML');//=> <li>Pear</li>$('.apple').attr('id', 'favorite');$('.apple').removeAttr('id class').prop('outerHTML');//=> <li>Apple</li> Copy
$('.pear').removeAttr('class').prop('outerHTML');//=> <li>Pear</li>$('.apple').attr('id', 'favorite');$('.apple').removeAttr('id class').prop('outerHTML');//=> <li>Apple</li>
https://api.jquery.com/removeAttr/
Method for removing attributes by
name.