Skip to content

Several overlays programmatically closing #455

Answered by fancyapps
oshumelka asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

Fancybox.close(false); would close only the top-most instance. It is actually the same as Fancybox.getInstance().close().

Also, if you store somewhere references to each instance, you can close them individually:

const fb1 = new Fancybox([{html : "One"}]);
const fb2 = new Fancybox([{html : "Two"}]);

fb1.close();
fb2.close();

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oshumelka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants