Created
September 14, 2010 18:17
-
-
Save jleppert/579501 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jQueryBind = $.fn.bind; | |
$.fn.bind = function( type, data, fn ) { | |
// mousemove.slider hack to prevent sticky slider | |
// mousemove.draggable hack to prevent sticky modal | |
if ( !fn && data && typeof data == 'function' && type != 'mousemove.slider' && type != 'mousemove.draggable' ) | |
{ | |
fn = data; | |
data = null; | |
} | |
if ( fn ) | |
{ | |
var origFn = fn; | |
var wrappedFn = function() { | |
try | |
{ | |
return origFn.apply( this, arguments ); | |
} | |
catch ( ex ) | |
{ | |
trackError( ex ); | |
// re-throw ex iff error should propogate | |
// throw ex; | |
return false; | |
} | |
}; | |
fn = wrappedFn; | |
} | |
return jQueryBind.call( this, type, data, fn ); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment