Skip to content
Discussion options

You must be logged in to vote

Hi,

So, you want to close Fancybox from within the iframe? Then simply use parent with API any method (you can find list of methods here - https://fancyapps.com/docs/ui/fancybox/api), for example: parent.Fancybox.close().

Keep in mind that Fancybox object will not be globally available by default if you are using ES6 modules. In that case, simply make it global - window.Fancybox = Fancybox - right after importing Fancybox in your main frame.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@alberthenderson
Comment options

Answer selected by alberthenderson
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