]> source.dussan.org Git - jquery.git/commitdiff
Bug 7931; cleaned up white space in accordance to style guide 171/head
authorXavi <xavi.rmz@gmail.com>
Tue, 18 Jan 2011 17:40:07 +0000 (12:40 -0500)
committerXavi <xavi.rmz@gmail.com>
Tue, 18 Jan 2011 17:40:07 +0000 (12:40 -0500)
src/offset.js

index 660efa234b0dfe23bcfbabeadb6308fe9c8e6759..8696c205149ce2150823869d566d431cc200aeaa 100644 (file)
@@ -260,15 +260,15 @@ jQuery.fn.extend({
 jQuery.each( ["Left", "Top"], function( i, name ) {
        var method = "scroll" + name;
 
-       jQuery.fn[ method ] = function(val) {
+       jQuery.fn[ method ] = function( val ) {
                var elem, win;
 
-               if(val === undefined) {
-                       elem = this[0];
+               if( val === undefined ) {
+                       elem = this[ 0 ];
                        if( !elem ) {
                                return null;
                        }
-               
+
                        win = getWindow( elem );
                        // Return the scroll offset
                        return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
@@ -276,17 +276,16 @@ jQuery.each( ["Left", "Top"], function( i, name ) {
                                        win.document.body[ method ] :
                                elem[ method ];
                }
-               
+
                // Set the scroll offset
                return this.each(function() {
                        win = getWindow( this );
 
                        if ( win ) {
                                win.scrollTo(
-                                       !i ? val : jQuery(win).scrollLeft(),
-                                        i ? val : jQuery(win).scrollTop()
+                                       !i ? val : jQuery( win ).scrollLeft(),
+                                        i ? val : jQuery( win ).scrollTop()
                                );
-
                        } else {
                                this[ method ] = val;
                        }