确保 jquery 进度对话框至少显示一段最短时间
我使用 jquery ui 对话框让用户知道他的请求正在处理,而客户端正在处理一些数据。然而,众所周知,ie 的处理时间比 firefox 长得多。确保进度对话框至少显示一段最短时间的最佳模式是什么,这样它不仅仅在 Firefox 中闪烁,而且即使计时器到期,对话框也会保持打开状态直到浏览器完成加工?
I'm using a jquery ui dialog to let the user know that his request is in progress while the client is processing some data. However, as you all know, it takes a hell of a lot longer for ie to process than firefox. What's the best pattern for making sure that the progress dialog is displayed for at least some minimum amount of time, so it doesn't just flash in firefox, and also that, even if the timer expires, the dialog stays up until the browser finishes processing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过几种方式来解决这个问题,尽管它们本质上都是排队的一些衍生物。
例如:
无论如何,您真正要做的就是使用内置队列系统确保给定的延迟。您也可以在不使用队列系统的情况下完成它,但这是另一个例子。
You could address it in a few ways, although they all essentially do some derivative of queuing.
For instance:
Regardless, all you're really doing is ensuring a given delay using the built in queue system. You could accomplish it without using the queue system as well, but that's another example.