X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Foffset.js;h=11a187eedee51391cebb9c7f6862519439184045;hb=d7f5a0835bc463d15a4f6210e48110054a050f0b;hp=257035816169df4face0b3c50a289b900850806d;hpb=58c640fb1ce09a03399a3a441716cca23f3f2d04;p=jquery.git diff --git a/src/offset.js b/src/offset.js index 2570358..11a187e 100644 --- a/src/offset.js +++ b/src/offset.js @@ -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; };