I have a parent div , say with id=”to-remove”
This div has multiple children divs and each children div also can have in-turn multiple divs and each of them can have href and/or onclick events.
Is there way to remove all these events from inside this parent div using jquery..?
Did you try
.unbind():And as of jQuery 1.7, the
.on()and.off()methods are preferred to attach and remove event handlers on elements. (from.unbind()documentation) So if you’re using jQuery > 1.7.x then this would be better: