( function() { if ( !jQuery.fn.offset ) { return; } var supportsFixedPosition, supportsScroll, alwaysScrollable, forceScroll = supportjQuery( "
" ).css( { width: 2000, height: 2000 } ), checkSupport = function( assert ) { // Only run once checkSupport = false; var checkFixed = supportjQuery( "
" ) .css( { position: "fixed", top: "20px" } ) .appendTo( "#qunit-fixture" ); supportsFixedPosition = checkFixed[ 0 ].offsetTop === 20; checkFixed.remove(); // Append forceScroll to the body instead of #qunit-fixture because the latter is hidden forceScroll.appendTo( "body" ); window.scrollTo( 200, 200 ); supportsScroll = document.documentElement.scrollTop || document.body.scrollTop; forceScroll.detach(); // Support: iOS <=7 // Hijack the iframe test infrastructure to detect viewport scrollability // for pages with position:fixed document element var done = assert.async(), $iframe = supportjQuery( "