带延迟触发 Lightbox onLoad
有谁熟悉Lightbox2(http://www.huddletogether.com/projects/lightbox2/) 知道如何触发灯箱 onLoad 并且最好延迟 1 分钟?
Does anyone familiar with Lightbox2 (http://www.huddletogether.com/projects/lightbox2/) know how to trigger a lightbox onLoad and preferably with a 1 minute delay?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我使用了另一篇 SO 帖子中的一些信息来模拟点击事件:
使用 Prototype 触发事件
从 event.simulate.js 并在文件中包含引用。
将 id 添加到要自动触发的锚链接:
然后在文件底部插入此代码(或放入外部文件中):
delay() 函数中的数字是数字在灯箱启动之前您想要等待的秒数。
I used some info from another SO post to simulate the click event:
Trigger an event with Prototype
Get the code from event.simulate.js and include a reference in your file.
Add an id to the anchor link you want to auto-fire:
Then at the bottom of your file insert this code (or put in external file):
The number in the delay() function is the number of seconds you want to wait before the lightbox fires off.