jquery + ASP.NET 延迟回发
我想在 LinkButton 单击上实现 SlideUp jQuery 效果,然后在页面上进行回发。该效果需要 600ms 才能完成。我遇到的问题是,在 jQuery 效果完成之前,页面已经进行了回发,因此 jQuery 脚本在中途停止。除了手动回发之外,还有什么方法可以延迟回发吗?
I would like to implement a slideUp jQuery effect on LinkButton click and then do postback on page. The effect takes 600ms to accomplish. The problem I confront with is that before jQuery effect finishes page already does postback, so the jQuery script stops somewhere halfway. Is there any way to delay postback other then doing a manual postback?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可以为slideup提供一个函数,该函数仅在滑动完成时执行:
It is possible to provide a function to slideup which will only execute when the sliding is done:
您可以将加载/重新加载页面的调用放在
slideUp
动画的回调函数中。例如:
如果您可以发布您的代码,我可以向您展示更详细的信息。
You can put the call to load/reload the page in the callback function of the
slideUp
animation.Something like:
If you could post your code I can show you in more detail.
您可以通过
return false
阻止 PostBack 事件。然后通过使用正确的 LinkButton 名称(通过使用其UniqueID
)调用__doPostBack
来手动调用按钮的 PostBack。You can block the PostBack event with
return false
. Then invoke the PostBack of the button manually by calling__doPostBack
with the correct LinkButton name by using it'sUniqueID
.