开发者

setTimeout() - what's going on in IE6?

开发者 https://www.devze.com 2023-01-06 22:16 出处:网络
IE6 has got me again!I can write slideSuccess.show(); and all will be fine.When I replace that very line with

IE6 has got me again! I can write

slideSuccess.show();

and all will be fine. When I replace that very line with

开发者_StackOverflow社区
setTimeout(function() { slideSuccess.show(); }, 1000);

then, after 1 sec, my slide shows up garbled.

(slideSuccess is a jQuery object if that matters.)

Does anyone have any ideas what is going on here?

Thanks.


Instead of using a setTimeout(), which won't queue the show until 1 second from now, put the timeout in the queue using .delay(), like this:

slideSuccess.delay(1000).show();

Otherwise you're not showing then animating, you're animating and running a .show() during it, whatever animation is executing in the queue...instead you can delay the queue from starting overall, with .delay().

0

精彩评论

暂无评论...
验证码 换一张
取 消