/* Possible additions: scollTop CSS Matrix */ $.extend( $.support, { orientation: "orientation" in window, touch: "ontouchend" in document, WebKitAnimationEvent: typeof WebKitTransitionEvent === "object", pushState: !!history.pushState }); (function() { var fakeBody = $( "" ).prependTo( "html" ), displayDiv = $( "
" ) .prependTo( fakeBody )[ 0 ], positionDiv = $( "
" + "
").prependTo( fakeBody )[ 0 ], floatClearHtml = "
", floatClearWrap = $( "
" ) .append( floatClearHtml + floatClearHtml ) .prependTo( fakeBody ), floatClearDivs = floatClearWrap.children(), floatClearDiv1Top = floatClearDivs[ 0 ].offsetTop, floatClearDiv2 = floatClearDivs[ 1 ], supportFloatClear = false; if ( floatClearDiv1Top === floatClearDiv2.offsetTop ) { floatClearDiv2.style.clear = "left"; if ( floatClearDiv1Top !== floatClearDiv2.offsetTop ) { supportFloatClear = true; } } $.extend( $.support, { display: displayDiv.offsetHeight === 0, position: positionDiv.offsetLeft === 10, overflow: positionDiv.offsetHeight === 0, floatclear: supportFloatClear, cssPseudoElement: fakeBody[0].style.content !== undefined }); fakeBody.remove(); })(); // test whether a CSS media type or query applies $.media = (function() { // TODO: use window.matchMedia once at least one UA implements it var cache = {}, $html = $( "html" ), testDiv = $( "
" ), fakeBody = $( "" ).append( testDiv ); return function( query ) { if ( !( query in cache ) ) { var styleBlock = $( "" ); $html.prepend( fakeBody ).prepend( styleBlock ); cache[ query ] = testDiv.css( "position" ) === "absolute"; fakeBody.add( styleBlock ).remove(); } return cache[ query ]; }; })();