remove attribute onclick jquery 1

remove attribute onclick jquery

$("...").attr("onclick", "").unbind("click");

Here is what the above code is Doing:
1. The first line is a selector that finds all the elements with the class “button”.
2. The second line is a method that removes the attribute “onclick” from all the elements that were selected.
3. The third line is a method that removes all the click events from all the elements that were selected.

Similar Posts