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
Here is solution, it will wrap any function sent to ready with try-catch block:
(function($){ $.fn.oldReady = $.fn.ready; $.fn.ready = function(fn){ return $.fn.oldReady( function(){ try{ if(fn) fn.apply($,arguments); } catch(e){}} ); } })(jQuery);