Reputation: 993
I have a Fancybox that opens a contact form from an iframe. Inside the iframe, i have a close button but it's not working.
I have tryed both with $.fancybox.close();
and parent.jQuery.fancybox.close();
What am I doing wrong ?
Upvotes: 0
Views: 7031
Reputation: 1681
The problem is you are trying to execute parent windows js function with different host name ( its not allowed ).
Try access you site without www.
( this is because your contact
button using fancy from url without www.
)
Upvotes: 1
Reputation: 14282
As per http://fancybox.net/api Try this instead :
parent.$.fancybox.close();
Upvotes: 9