jQuery Attribute Manipulation - removeAttr() Method
Example
Remove the id attribute from any p element:
$("button").click(function(){ $("p").removeAttr("id"); });
Definition and Usage
The removeAttr() method removes attributes from the selected elements.
Syntax
$().removeAttr(attribute)
Parameter | Description |
---|---|
attribute | Required. Specifies the attribute to be removed from the specified element. |