Your Cart

this.bind(‘fullscreen_enter’, function() { not working

These forums are now closed to new replies / tickets.

Please open a support ticket from our new Support page.

Front Page Forums Questions this.bind(‘fullscreen_enter’, function() { not working

  • gravatar
    Kseniya
    November 13, 2014 at 10:26 am

    i try open fullscrin in parent window with iframe. My code
    is
    function getHash() {
    var ifs = window.top.document.getElementsByTagName(“iframe”);
    console.log(ifs.length); for(var i = 0, len = ifs.length; i <
    len; i++) { var f = ifs[i]; var fDoc = f.contentDocument ||
    f.contentWindow.document; if(fDoc === document) { return
    f.getAttribute(‘id’);

              }
           }
    

    }

    Galleria.loadTheme('<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/js/themes/classic/galleria.classic.min.js');
    

    /*Galleria.configure({ trueFullscreen: false }).ready(function()
    { this.bind(‘fullscreen_enter’, function() {
    window.top.enterFullscreen(); }).bind(‘fullscreen_exit’, function()
    { window.top.exitFullscreen(); }) });*/ // Initialize Galleria
    Galleria.run(‘#galleria’, { width: 877, height: 550,
    imageCrop:’landscape’, transition:’fade’, autoplay: 7000 });

    Galleria.ready(function() {
    var gallery = this; // galleria is ready and the gallery is
    assigned
    $(‘.galleria-stage’).append(‘

     

    ‘); $(‘#fullscreen’).click(function() { var idd = getHash();

    var $iframe = $(window.top.document).find(‘#’+idd);
    this.bind(‘fullscreen_enter’, function() {
    $iframe.addClass(‘fullscreen’); }).bind(‘fullscreen_exit’,
    function() { $iframe.removeClass(‘fullscreen’); });
    //gallery.toggleFullscreen(); // toggles the fullscreen

    }); this.bind(‘image’, function(e) {
    imageurl = e.imageTarget.src; pageurl =
    $(location).attr(‘href’);
    });

    });


Galleria.io uses cookies to store information. You can read more about that in our Privacy Policy. I understand