1

I read some post asking for this and i tried to work it out but i'am not good enough to make it work please help! :)

I have a site where i have an iframe in that iframe i have a link that should open in fancy box but not only in current iframe i want it to fill the whole screen..

I've got the initial code from: http://www.htmldrive.net/items/demo/693/JQuery-Fancy-lightbox-alternative Here is my code:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
    !window.jQuery && document.write('<script src="jquery-1.4.3.min.js"><\/script>');
</script>
<script type="text/javascript" src="./fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="./fancybox/jquery.fancybox-1.3.2.js"></script>
<link rel="stylesheet" type="text/css" href="./fancybox/jquery.fancybox-1.3.2.css" media="screen" />
<link rel="stylesheet" href="css/style_fancy.css" />
<script type="text/javascript">
    $(document).ready(function() {
                    /*
        *   Examples - images
        */

        $("a#example1").fancybox();

        $("a#example2").fancybox({
            'overlayShow'   : false,
            'transitionIn'  : 'elastic',
            'transitionOut' : 'elastic'
        });

        $("a#example3").fancybox({
            'transitionIn'  : 'none',
            'transitionOut' : 'none'    
        });

        $("a#example4").fancybox({
            'opacity'       : true,
            'overlayShow'   : false,
            'transitionIn'  : 'elastic',
            'transitionOut' : 'none'
        });

        $("a#example5").fancybox();

        $("a#example6").fancybox({
            'titlePosition'     : 'outside',
            'overlayColor'      : '#000',
            'overlayOpacity'    : 0.9
        });

        $("a#example7").fancybox({
            'titlePosition' : 'inside'
        });

        $("a#example8").fancybox({
            'titlePosition' : 'over'
        });

        $("a[rel=example_group]").fancybox({
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'titlePosition'     : 'over',
            'titleFormat'       : function(title, currentArray, currentIndex, currentOpts) {
                return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
        });
        /*
        *   Examples - various
        */

        $("#various1").fancybox({
            'titlePosition'     : 'inside',
            'transitionIn'      : 'none',
            'transitionOut'     : 'none'
        });

        $("#various2").fancybox();

        $("#various3").fancybox({
            'width'             : '75%',
            'height'            : '75%',
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'     : 'none',
            'type'              : 'iframe'
        });

        $("#various4").fancybox({
            'padding'           : 0,
            'autoScale'         : false,
            'transitionIn'      : 'none',
            'transitionOut'     : 'none'
        });
    });
</script>

And my link is like this: <a href="http://www.site.com/test.html" id="various3">test</a>

right now it opens the page like it's supposed to but only in the iframe, and i would like it to be on top of the whole page...

Thx in advance :)

Robert
  • 11
  • 1
  • what version of fancybox? if using v2.x, check http://stackoverflow.com/a/8855410/1055987 .... if using v1.3.4 check https://groups.google.com/forum/?fromgroups=#!topic/fancybox/KPq4mAQn2qc – JFK Apr 29 '13 at 17:26

0 Answers0