'How to automatically close fancybox 4 popup after x seconds?
I have a web page page.html with this fancybox4 link
<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.
I tried variuos solutions found in stackexchange but nothing worked (all solutions are referred to fancybox2 or older version).
Solution 1:[1]
From the documentation - https://fancyapps.com/docs/ui/fancybox/api - you can close Fancybox using Fancybox.close();
- so, all you have to do is to figure out how to execute it after some timeout
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Janis |