I\'m developing JS that is used in a web framework, and is frequently mixed in with other developers\' (often error-prone) jQuery code. Unfortunately errors in their jQuery(docu
I haven't tried this code, but it should work (at least, the idea should anyway). Make sure you include it AFTER jquery, but BEFORE any potentially buggy scripts. (Not necessary, see comments.)
var oldReady = jQuery.ready;
jQuery.ready = function(){
try{
return oldReady.apply(this, arguments);
}catch(e){
// handle e ....
}
};