2

Is there a way to get lightbox2 to bind to a div when in fullscreen (browser) rather than the body.

I am trying to appendTo the #lightboxOverlay and #lightbox to a specific div but it switches back to the body.

function fullScreenControl() {
  $("#fullscreenController a").on("click", function(e) {
    var elem = document.getElementById('application');
    if (isFullScreen()) {
      $(this).removeClass("zoomed")
      $("#lightboxOverlay").appendTo("body");
      $("#lightbox").appendTo("body");
      exitFullScreen();

    } else {
      $(this).addClass("zoomed");
      $("#lightboxOverlay").appendTo("#application");
      $("#lightbox").appendTo("#application");
      requestFullScreen(elem || document.elem);

    }
    e.preventDefault();
  });
}

The idea is that my #application div is told to go fullscreen and they can click on images using lightbox2. But the lightbox snaps back to the body tag.

William-H-M
  • 1,050
  • 1
  • 13
  • 19

0 Answers0