mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
added curly braces around all if/else statements
This commit is contained in:
committed by
John Resig
parent
1879e8cbee
commit
ddb86f8d5b
@@ -20,7 +20,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
|
||||
jQuery.fn[ type ] = function( size ) {
|
||||
// Get window width or height
|
||||
var elem = this[0];
|
||||
if ( !elem ) return null;
|
||||
if ( !elem ) { return null; }
|
||||
return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
|
||||
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
|
||||
elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
|
||||
|
||||
Reference in New Issue
Block a user