Remova o atributo jQuery
$("button").click(() => {
$("div").removeAttr("id"); // <div id='12' class='nice'></div> --> <div class='nice'></div>
});
Ganandor
$("button").click(() => {
$("div").removeAttr("id"); // <div id='12' class='nice'></div> --> <div class='nice'></div>
});
//for a class
$('.inputDisabled').prop("disabled", false);
//for a ID
$('#inputDisabled').prop("disabled", false);
jQuery(document).ready(function($){
$('.className').click(function(){
$('.targetElementClassName').removeAttr('title');
});
});
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">