简体   繁体   English

如何在 x 秒后自动关闭 fancybox 4 弹出窗口?

[英]How to automatically close fancybox 4 popup after x seconds?

I have a web page page.html with this fancybox4 link我有一个 web 页面 page.html 这个 fancybox4 链接

<a href="link.html" data-fancybox data-type="iframe" data-width="80%" data-height="25%" >

I would close automatically fancybox iframe link.html after 3 seconds.我会在 3 秒后自动关闭 fancybox iframe link.html。

I tried variuos solutions found in stackexchange but nothing worked (all solutions are referred to fancybox2 or older version).我尝试了在 stackexchange 中找到的各种解决方案,但没有任何效果(所有解决方案都指的是 fancybox2 或旧版本)。

From the documentation - https://fancyapps.com/docs/ui/fancybox/api - you can close Fancybox using Fancybox.close();从文档 - https://fancyapps.com/docs/ui/fancybox/api - 您可以使用Fancybox.close(); - so, all you have to do is to figure out how to execute it after some timeout - 所以,你所要做的就是弄清楚如何在超时后执行它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM