Wednesday, February 17, 2010

Remove non-jQuery Event with jQuery

It was driving me nuts trying to remove a checkbox onclick event that was created with JavaScript rather than through jQuery. After trying unbind(), click(), attr() etc. I found the solution on StackOverflow - use removeAttr():

$('#btnNext').removeAttr("onclick");

No comments: