Javascript / jQuery — Unbind Inline Onclick

Unbind or replace an inline javascript onclick attribute.

$(“#your_element”)[0].onclick = null;

In trying random things to solve this.. my main problem was forgetting [0]

Enjoy.

1 Comment

  1. Muthu says:

    Really nice tip. It saves my time. Thanks

Leave a reply to Muthu Cancel reply