diff options
author | Karl Swedberg <karl@englishrules.com> | 2009-11-28 03:28:42 +0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-11-28 04:09:14 +0800 |
commit | ddb86f8d5bd1bd21b2beeeea55baf505b47dfed5 (patch) | |
tree | c52314e46719d2b4fa9969fbebd1bd711c7d59ab /src/event.js | |
parent | 1879e8cbeef6984495ee84f482900defda0dc3f4 (diff) | |
download | jquery-ddb86f8d5bd1bd21b2beeeea55baf505b47dfed5.tar.gz jquery-ddb86f8d5bd1bd21b2beeeea55baf505b47dfed5.zip |
added curly braces around all if/else statements
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 |