diff options
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/src/event.js b/src/event.js index 7e8707c3b..2bb8a0edc 100644 --- a/src/event.js +++ b/src/event.js @@ -592,16 +592,18 @@ jQuery.each({ event.special[orig] = { setup:function() { - if ( this.addEventListener ) + if ( this.addEventListener ) { this.addEventListener( orig, handle, true ); - else + } else { event.add( this, fix, ieHandler ); + } }, teardown:function() { - if ( this.removeEventListener ) + if ( this.removeEventListener ) { this.removeEventListener( orig, handle, true ); - else + } else { event.remove( this, fix, ieHandler ); + } } }; }); @@ -820,7 +822,7 @@ jQuery.extend({ var readyBound = false; function bindReady() { - if ( readyBound ) return; + if ( readyBound ) { return; } readyBound = true; // Catch cases where $(document).ready() is called after the @@ -857,23 +859,25 @@ function bindReady() { toplevel = window.frameElement == null; } catch(e){} - if ( document.documentElement.doScroll && toplevel ) (function() { - if ( jQuery.isReady ) { - return; - } + if ( document.documentElement.doScroll && toplevel ) { + (function() { + if ( jQuery.isReady ) { + return; + } - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch( error ) { - setTimeout( arguments.callee, 0 ); - return; - } + try { + // If IE is used, use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + document.documentElement.doScroll("left"); + } catch( error ) { + setTimeout( arguments.callee, 0 ); + return; + } - // and execute any waiting functions - jQuery.ready(); - })(); + // and execute any waiting functions + jQuery.ready(); + })(); + } } // A fallback to window.onload, that will always work |