if ( computed ) {
- ret = computed[ name ];
+ // getPropertyValue is only needed for .css('filter') in IE9, see #12537
+ ret = computed.getPropertyValue( name ) || computed[ name ];
+
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
ret = jQuery.style( elem, name );
}
ok( jQuery.isNumeric( parseFloat( el.css("fontWeight") ) ), "css('fontWeight') not convertable to number, see #8627" );
});
+// only run this test in IE9
+if ( document.documentMode === 9 ) {
+ test( ".css('filter') returns a string in IE9, see #12537", 1, function() {
+ equal( jQuery("<div style='-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)\";'></div>").css("filter"), "progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)", "IE9 returns the correct value from css('filter')." );
+ });
+}
+
test( "cssHooks - expand", function() {
expect( 15 );
var result,
var foo = jQuery("#foo"),
initial = foo.css("backgroundPositionX");
- if ( initial == null ) {
+ if ( !initial ) {
expect(1);
ok( true, "Style property not understood" );
start();