i know this is a little late, but jQuery exposed this in v1.7 and higher. I have a meeting and will turn this into a working example when i get back ... if I get back.... wish me luck.
#fiddle
this runs off the click event, but you can switch it to submit with thought
html
reposting the html from jsfiddle
<form>
<p>before click</p>
<button type="button">start</button>
</form>
javascript
reposting the javascript from jsfiddle
var $elem = $("button"), //jqElementObject
elem=$elem[0], //html element object
eventNameKey="click", //name of the event we want to alter
eventHandlerKey="handler"; //jQuery private object reference to get the actual function ref
$elem.click(function(ev){
//this happens somewhere else, pretend we can't control it per your comments
console.log("1");
ev.preventDefault();
$("p").text($("p").text()+"<div>first binding</div>");
});
//this is ours, we can control this
function submitControler(ev){
console.log("2");
ev.preventDefault();
$("p").text($("p").text()+"<div>second binding</div>");
//uncomment below to stop propogation
//return false;
}
$elem.click(submitControler); //actually register our event
$elem.click(function(ev){ //third event for some fun
ev.preventDefault();
$("p").text($("p").text()+"<div>third binding</div>");
});
var officialEvents = $._data(elem,"events"), //jQuery official Private events
ourSubmitEvents = $.Callbacks("unique stopOnFalse"); //default Callbacks values promises to behave like a standard events list, however, you want your event to fire first, then others to proceed if it returns true. also, no duplicates just because.
//I'm running out of time, so i went with a for loop. I wanted a way to find our event where the registration order was not guaranteed, feel free to go for something better
for(var event = officialEvents[eventNameKey].length-1; event >-1; event--){
if(officialEvents[eventNameKey][event][eventHandlerKey] ===submitControler){
ourSubmitEvents.add(officialEvents[eventNameKey][event][eventHandlerKey]);
console.log("added primary controler");
break;
}
}
//add in everyone else to our list, again, i'm out of time and a for loop was the first thought i had. feel free to improve
for(var event = 0; event < officialEvents[eventNameKey].length; event++){
if(officialEvents[eventNameKey][event][eventHandlerKey] !==submitControler){
ourSubmitEvents.add(officialEvents[eventNameKey][event][eventHandlerKey]);
console.log("added secondary controler");
}
}
//this is our event scheduler, it will be first to execute, and calls our manually re-ordered 'ourSubmitEvents' object. ('ourSubmitEvents' becomes 'ev.data')
$elem.on({"click":function(ev){
ev.preventDefault();
ev.data.fire(ev);
}},null,ourSubmitEvents);
//remove the other events, except the one we just registered.
$._data(elem,"events")[eventNameKey].splice(0,officialEvents[eventNameKey].length-1);