Skip to content

Commit 67540fd

Browse files
committed
Effects tests: Don't use internal jQuery properties to detect support for fixed positioning.
1 parent 05adce8 commit 67540fd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/unit/effects/effects_scale.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ function suite( position ) {
5353
$(function() {
5454
suite( "absolute" );
5555
suite( "relative" );
56-
var fixed = $.support.fixedPosition;
57-
// jQuery < 1.7 uses $.offset.supportsFixedPosition
58-
if ( fixed === undefined ) {
59-
$.offset.initialize();
60-
fixed = $.offset.supportsFixedPosition;
61-
}
62-
if ( fixed ) {
56+
var fixedElem = $( "<div>" )
57+
.css({
58+
position: "fixed",
59+
top: 10
60+
})
61+
.appendTo( "body" );
62+
if ( fixedElem.offset().top === 10 ) {
6363
suite( "fixed" );
6464
}
6565
});

0 commit comments

Comments
 (0)