Learn all about the jQuery function .removeAttr().
removeAttribute() function, but it has the advantage of being able to be called directly on a jQuery object and it accounts for different attribute naming across browsers.
Note: Removing an inline
onclick event handler using
.removeAttr() doesn’t achieve the desired effect in Internet Explorer 6, 7, or 8. To avoid potential problems, use