added curly braces around all if/else statements

This commit is contained in:
Karl Swedberg 2009-11-28 03:28:42 +08:00 committed by John Resig
parent 1879e8cbee
commit ddb86f8d5b
7 changed files with 149 additions and 121 deletions

View file

@ -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