]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects tests: Proper detection of fixed position support in jQuery 1.7.
authorScott González <scott.gonzalez@gmail.com>
Wed, 9 Nov 2011 16:38:16 +0000 (11:38 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 9 Nov 2011 16:38:16 +0000 (11:38 -0500)
tests/unit/effects/effects_scale.js

index a607361e6f0bc583273d11755c68767489f71156..b9bb91c2e8f79ca090d625132d3a3e58e70fe020 100644 (file)
@@ -54,8 +54,13 @@ function suite( position ) {
 $(function() {
        suite( "absolute" );
        suite( "relative" );
-       $.offset.initialize();
-       if ( $.offset.supportsFixedPosition ) {
+       var fixed = $.support.fixedPosition;
+       // jQuery < 1.7 uses $.offset.supportsFixedPosition
+       if ( fixed === undefined ) {
+               $.offset.initialize();
+               fixed = $.offset.supportsFixedPosition;
+       }
+       if ( fixed ) {
                suite( "fixed" );
        }
 });