Fixed #2062 by adding a check to see if the selector is array-like in .not() before...
[jquery.git] / src / offset.js
index 2570358..11a187e 100644 (file)
@@ -72,7 +72,7 @@ jQuery.fn.offset = function() {
                        // Safari <= 2 doubles body offsets with a fixed position element/offsetParent or absolutely positioned offsetChild
                        // Mozilla doubles body offsets with a non-absolutely positioned offsetChild
                        if ( (safari2 && (fixed || jQuery.css(offsetChild, "position") == "absolute")) || 
-                               (mozilla && jQuery.css(offsetChild, "position") != "absoltue") )
+                               (mozilla && jQuery.css(offsetChild, "position") != "absolute") )
                                        add( -doc.body.offsetLeft, -doc.body.offsetTop );
                        
                        // Add the document scroll offsets if position is fixed
@@ -85,8 +85,6 @@ jQuery.fn.offset = function() {
                results = { top: top, left: left };
        }
 
-       return results;
-
        function border(elem) {
                add( jQuery.css(elem, "borderLeftWidth"), jQuery.css(elem, "borderTopWidth") );
        }
@@ -95,4 +93,6 @@ jQuery.fn.offset = function() {
                left += parseInt(l) || 0;
                top += parseInt(t) || 0;
        }
+
+       return results;
 };