开发者

jQuery show is blocked by long-running function

开发者 https://www.devze.com 2023-02-15 03:58 出处:网络
$(\'#someid\').show(); someLongRunningFunction(); It seems that this co开发者_高级运维de shows $(\'#someid\') only after someLongRunningFunction is finished. Is there any way to change this behavior
$('#someid').show();
someLongRunningFunction();

It seems that this co开发者_高级运维de shows $('#someid') only after someLongRunningFunction is finished. Is there any way to change this behavior? I use jQuery 1.4.4.


Try using the callback parameter...

$('#someid').show('slow' ,someLongRunningFunction); 

or

$('#someid').show('fast' ,someLongRunningFunction); 
0

精彩评论

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