remove attribute jquery
snippet in javascript

remove attribute jquery

user1748

$("button").click(() => {
  $("div").removeAttr("id"); // <div id='12' class='nice'></div> --> <div class='nice'></div>
});

.removeAttr()

user8540


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

remove attribute jquery

user1508

$('p').attr('style','');