$().attr('id',''
) still leaves id = ""
snippet,
how to completely remove it?
The removeAttr() method is an inbuilt method in jQuery which is used to remove one or more attributes from the selected elements. Parameters: This function accepts single parameter attribute which is mandatory. It is used to specify one or more attributes to remove.
jQuery removeAttr() Method The removeAttr() method removes one or more attributes from the selected elements.
I found out that I can make it happen with the following code: jQuery(this). prev("li")show(function() { this.id="newid"; });
Use the removeAttr
method.
$('selector').removeAttr('id')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With