Answers for "js removeAttr"

14

remove attribute jquery

$("button").click(() => {
  $("div").removeAttr("id"); // <div id='12' class='nice'></div> --> <div class='nice'></div>
});
Posted by: Guest on March-23-2020
0

assigned property delete in jquery

We can use removeAttr() to delete the assigned property of the element.

Example:
<p class="element_name" id="element_id" name="element_name">
  
js: $("p").removeAttr("name");
output: <p class="element_name" id="element_id">
Posted by: Guest on August-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language