I'm forced to use a script loaded from an external server.
This script basically adds an element <div class="myClass"> and bind a click method to it.
The thing is, in the click function associated to the element, they have a return false statement at the end.
I also have my own script and I'm trying to add a click method to the same element using $(document).on('click', '.myClass', function() { ... })
My problem is that their event is triggered before and the return false in their function doesn't trigger my own click method.
I've tried loading my script before theirs but that didn't fix the problem. I've read about unbinding and then rebinding but I'm not sure it's a good option since their code can change at any moment.
Anything else I could try?
event.preventDefault()for your script.$(document).on('click.namespace', '.myClass', function() { ... })?