Replacing jquery animation type with variables
hello!
I'm kind of newbie and struggling right now with some workaround for the IE7/8 PNG transparency issue.
what I have already done is that I'm replacing the fadeIn() with show() and fadeOut() with hide():
// setting variables
var showElemIEFix = 'fadeIn', hideElemIEFix = 'fadeOut';
// browser check, setting animation to show/hide
if (!$.support.leadingWhitespace) {
showElemIEFix = 'show';
hideElemIEFix = 'hide'
}
$('.startButton').delay(1000).[showElemIEFix]();
what I need is to pass a constant duration value with my variable [hideElemIEFix]() when the if statement is true to get on IE 7/8:
$('.startButton').delay(1000).show(0);
The ZERO (0) in show is important for delay to get it work. If I don't pass duration value on show(), delay wouldn't trigger.
for other Browsers it is ok, when I have:
$('.startButton').delay(1000).fadeIn();