I\'m trying to close FancyBox from within the iframe, but parent.$ is always undefined. This is my iframe JavaScript:
parent.$
undefined
It is undefined because WordPress runs jQuery in noConflict mode. Use this instead:
parent.jQuery.fancybox.close();
noConflict mode means $ does not equal jQuery. You have to explicitly use jQuery to access what you normally can access with $.
noConflict
$
jQuery