bugfix for jquery-1.4.2, internet explorer 8, jquery.fx.step()
Hi.
I'm developing a free web component, http://mediabeez.ws/lah, which runs into a startup problem when viewed in IE, caused by jquery. The thing crashes due to a "invalid argument" error.
I hereby propose the following fix;
jquery-1.4.2.source.js: line 5892 and further:
old code:
step: {
opacity: function( fx ) {
jQuery.style(fx.elem, "opacity", fx.now);
},
_default: function( fx ) {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
} else {
fx.elem[ fx.prop ] = fx.now;
}
}
}
new code:
step: {
opacity: function( fx ) {
jQuery.style(fx.elem, "opacity", fx.now);
},
_default: function( fx ) {
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
try {
fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
} catch(e) {} finally {};
} else {
fx.elem[ fx.prop ] = fx.now;
}
}
}
i hope this can be included in the next version of jquery.