I have a page with an iframe, on the iframe page I have a img that opens up a fancybox. This works just fine, It's just that the modal box targets the iframe, giving only part of the whole page a dark overlay and centering the fancybox on the iframe instead of the whole page.
This is the code:
<img src="/img/icons/calendar.png" class="fancybox" id="fancyCalendar" />
<script>
$j('#fancyCalendar').click(function() {
$j.fancybox.open({
href: 'calendar.html',
type: 'iframe',
padding: 5,
width: 880,
height: 335
});
});
</script>
I've tried these things, none worked:
- adding a target to the img
- making the img a link with a target
- prepending window.parent to the fancybox.open prepending
- window.parent.parent to the fancybox.open
I don't know what else I can try, does anybody know how to doe this?