]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Use $.isWindow()
authorScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 19:34:21 +0000 (14:34 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 19:34:21 +0000 (14:34 -0500)
ui/jquery.ui.position.js

index 9d490d2749dfc26ce180413105c049d9405b0469..3992e1c63a173a46cecaac629436e9e6674e5b94 100644 (file)
@@ -37,8 +37,7 @@ $.fn.position = function( options ) {
                targetWidth = target.width();
                targetHeight = target.height();
                basePosition = { top: 0, left: 0 };
-       // TODO: use $.isWindow() in 1.9
-       } else if ( targetElem.setTimeout ) {
+       } else if ( $.isWindow( targetElem ) ) {
                targetWidth = target.width();
                targetHeight = target.height();
                basePosition = { top: target.scrollTop(), left: target.scrollLeft() };