jQuery removeAttr Method

jQuery removeAttr method : The primary use of the removeAttr method is used to remove attribute from the html element. Below is simple example with demo and online editor.

jQuery removeAttr Method Syntax

Here is syntax to remove attributes from html elements.


attr_name: It is name of attribute which you want to remove.

jQuery removeAttr Method Example

Here is an example of jQuery remove Attribute method-

jQuery removeAttr() Method – Example –

<script type="text/javascript">
              $( "#attrExample" ).on( "click", function(event) {             

Try it »

This will produce the following output –

Note : This is screenshot of the output. To run this demo click on the above Try it button.

jQuery removeAttr Method


Add Comment

📖 Read More