The FAQ explains this best.
http://fancy.klade.lv/faq
<a href="javascript:$.fn.fancybox.close();" target="top">close me</a>
works for me as well as the above code I explained earlier.
Just adding this to better fill in for future people who need to do
this.
Dale Larsen
On May 18, 4:53 pm, Dale Larsen <
dalelarse...@gmail.com> wrote:
> Its really simple what gustav is saying.
>
> I am using ajax, not an iframe, however with an iframe use
> target="top" on your link.
>
> The line that serena can't seem to find can be found by simply doing a
> search for the end of gustav's line.
>
> Here is the line for version 1.2.1:
> $("#fancy_close").bind("click", $.fn.fancybox.close);
>
> add this after the above line:
> $('.close_fancybox').live('click', $.fn.fancybox.close);
>
> That works perfectly for me. I just assigned class="close_fancybox" to
> a span tag and it works in an ajax window.
>
> I have not tested this but for a link you could try <a href="#"
> class="close_fancybox" target="top">close</a>.
>
> Good luck!
>
> Dale Larsen
>
> On Apr 15, 6:32 am, coreyf <
corey.far...@alcatel-lucent.com> wrote:
>
> > @gustav or anyone else,
>
> > I too would like to know how toclosefancyboxiframe with an internal
> > link (embedded in the iframe) but I am using
> > "jquery.fancybox-1.2.1.js" and it seems to be very different than
> > "jquery.fancybox-1.2.0.js".
>
> > Can you provide a walkthrough concerning how to go about implementing
> > this for version 1.2.1?
>
> > Furthermore, (concerning your walkthrough above) when I add the class
> > "close_fancybox" to my link, do I also have to put the javascript and
> > css tags forfancyboxwithin the "head" tags of my iframe page for
> > that class to communicate withfancybox? Otherwise, it seems like the