jQuery show被长时间运行的函数阻止

时间:2011-03-07 19:37:20

标签: javascript jquery jquery-animate

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

此代码似乎仅在$('#someid')完成后显示someLongRunningFunction。有没有办法改变这种行为?我使用jQuery 1.4.4。

1 个答案:

答案 0 :(得分:0)

尝试使用回调参数...

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

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