This little snippet is being posted because of extreme frustration in trying to find the answer for how to close a fancybox window with a link or button. Hopefully this little tid-bit will help you out.
How to close Fancybox from an Iframe:
<button onclick=”parent.jQuery.fancybox.close();”>Close</button>
And it will look like this:
or for a textual link:
<a href=”#” onclick=”parent.jQuery.fancybox.close();”>Close</a>
And it will look like this:
or for a textual link:
<a href=”#” onclick=”parent.jQuery.fancybox.close();”>Close</a>
Thanks for this!!! Looked all over.
Thanks! Very helpful!
You saved my day! Thank you very much!
Man, it only took me two hours to find this. Thanks for posting this!
Me too. Thank bro.
Thank you for this information, it really help me a lot. ^_^
Thanks a lot!!
I know this if off topic but I’m looking into starting
my own weblog and was wondering what all
is needed to get setup? I’m assuming having a blog like yours would cost a
pretty penny? I’m not very internet savvy so I’m not 100% certain.
Any suggestions or advice would be greatly appreciated.
Thank you