Forcing an event handler to be the first handler
We have a few places in jQuery UI where we need to prevent events from occurring, e.g., preventing the click event after a drag. We've been partially successful by just binding a handler and the click event and returning false. This can be improved by calling event.stopImmediatePropagation(), but that won't prevent handlers bound before ours from running. The only solution I can come up with is to force our handler to be the first handler. With some help from Ariel, I've put togheter some code ( <a href="http://codedumper.com/oxewu">
http://codedumper.com/oxewu</a> ) and I'm looking for some feedback. Is there some other way we can prevent event handlers from running? Are there still caveats like native onclick events?