在继续执行功能之前等待jQuery show()完成? [英] Wait for jQuery show() to finish before continuing function?
本文介绍了在继续执行功能之前等待jQuery show()完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法让我的div在jquery show()中可见,直到我的函数结束!它实际上在IE / FF但在Chrome中不起作用。在继续使用我的函数之前,如何确保我的元素可见?
这是我的代码:
<$ p $函数doOperation(){
$(#progressbar_area)。show();
(...)
}
解决方案
添加回调以显示:
$(#progressbar_area)。show(speed,function(){} );
动画完成后,回调函数将被调用。
I can't make my div visible with the jquery show() until my function is over! It actually works in IE/FF but not in Chrome. How can I make sure my element is visible before continuing with my function?
Here's my code:
function doOperation(){
$("#progressbar_area").show();
(...)
}
解决方案
Add a callback to show:
$("#progressbar_area").show(speed, function() {});
The callback function will be called when the animation is complete.
这篇关于在继续执行功能之前等待jQuery show()完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文