jQuery fadein 淡出可折叠网格

发布于 2024-08-12 00:25:39 字数 96 浏览 5 评论 0原文

我有一个可折叠的网格,当用户单击链接时,它会淡入和淡出。 问题是,当用户快速多次单击链接时,多个网格会打开并且不会淡出。这个问题仅在 Firefox 中出现,在 IE 中不出现。

I have a collapsable grid which fades in and out when ever user click on a link.
the problem is that when ever user clicks on the link multiple times very quickly,,multiple grids open and do not fade out..this problem is only seen in Firefox not in IE.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

2024-08-19 00:25:39

如果上一个动画尚未完成,您可能会遇到此问题。确保停止之前的动画。例如:

$("a.mylink").click(function() {
  $("#somediv").stop().toggle();
  return false;
});

这里的键是 stop()

If the previous animation hasn't finished, you could get this problem. Make sure you stop previous animations. For example:

$("a.mylink").click(function() {
  $("#somediv").stop().toggle();
  return false;
});

The key here is stop().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文