This seems deceptively simple.
How do you override the onclick event in the following HTML using JavaScript?
Try this:
// Setting the DOM element's onclick to null removes // the inline click handler $("#sample")[0].onclick = null; $("#sample").click(function() { alert("done") });