Reputation: 85056
I am working with a SharePoint application that has quite a bit of built in javascript already. I have run into an issue where I have added a click event to an element, but it is executing before several other click events, which causes problems.
If there are multiple click events on an element, is it possible to add one that will fire after all of the others using jQuery? I cannot change the order of when these events are attached.
Upvotes: 3
Views: 600
Reputation: 23315
Have you tried adding the event handler to the element's parent and hope that none of the children stop the event from bubbling?
The parent's handler will definitely be called after all of the immediate handlers. If you're using jQuery, event.target will contain the element that was actually clicked.
Upvotes: 4