How to Close Fancy box

590 Views Asked by At

I'm using Fancybox to load/display an iFrame in the fancybox. After an action in the fancybox, an AJAX request is made which responds with:

parent.$.fancybox.close();

Problem here is that when this runs, there's an error (chrome): "Failed to load resource"

Any ideas why, and/or how to close fancybox via the ajax request w/o error?

A little more technical details. In the Parent I have jQuery 1.5 w a bunch of plugins, in the iframe I have jQuery 1.5 with rails jquery-ujs.

Thanks

1

There are 1 best solutions below

2
Anriëtte Myburgh On

Try making it window.parent.$.fancybox.close();.