Easy Tutorial
❮ Misc Merge Traversing Find ❯

jQuery removeAttr() Method

jQuery HTML/CSS Methods

Example

Remove the style attribute from all <p> elements:

$("button").click(function(){
    $("p").removeAttr("style");
});

Definition and Usage

The removeAttr() method removes one or more attributes from the selected elements.


Syntax

Parameter Description
attribute Required. Specifies one or more attributes to remove. To remove several attributes, separate the attribute names with spaces.

More Examples

Remove Several Attributes from the Selected Elements


jQuery HTML/CSS Methods

❮ Misc Merge Traversing Find ❯