gpt4 book ai didi

javascript - 如何让jquery函数一次运行一个

转载 作者:行者123 更新时间:2023-11-28 10:57:00 25 4
gpt4 key购买 nike

我用它来运行 jquery 函数:

<script type="text/javascript">$('#customer_popup_notes').reveal();</script>

<script type="text/javascript">$('#customer_on_hold').reveal();</script>

与其在页面加载时同时运行这两个程序,不如如何让它们一次运行一个?

它们是页面加载时出现的弹出框 - 所以我想:

  1. 加载第一个,
  2. 然后当盒子关闭时,第二个盒子就会加载。
  3. 等等...

最佳答案

由于reveal没有任何关于这方面的官方文档,所以我快速阅读了源代码并尝试了一下。希望对您有帮助

$('#customer_popup_notes').bind('reveal:close', function(){
$('#customer_on_hold').reveal();
})

$('#customer_popup_notes').reveal();

更新:基于代码https://github.com/zurb/reveal/blob/master/jquery.reveal.js ,您有 2 个事件:reveal:openreveal:close

关于javascript - 如何让jquery函数一次运行一个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19141146/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com