Core: Check if jQuery supports inner/outer/Width/Height setters.

This commit is contained in:
Scott González 2012-05-21 15:29:53 -04:00
parent 15ece1f51a
commit 033f83ffeb

View File

@ -119,7 +119,9 @@ $.fn.extend({
} }
}); });
$.each( [ "Width", "Height" ], function( i, name ) { // support: jQuery <1.8
if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
$.each( [ "Width", "Height" ], function( i, name ) {
var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
type = name.toLowerCase(), type = name.toLowerCase(),
orig = { orig = {
@ -161,7 +163,8 @@ $.each( [ "Width", "Height" ], function( i, name ) {
$( this).css( type, reduce( this, size, true, margin ) + "px" ); $( this).css( type, reduce( this, size, true, margin ) + "px" );
}); });
}; };
}); });
}
// selectors // selectors
function focusable( element, isTabIndexNotNaN ) { function focusable( element, isTabIndexNotNaN ) {