Example

Remove the style attribute from all p elements:

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

Try it yourself »

Definition and Usage

The removeAttr() method removes a specified attribute from the selected elements.

Syntax

$(selector).removeAttr(attribute)

Parameter Description
attribute Required. Specifies the attribute to remove