0

I am using the Galleria jQuery slideshow plugin. I can get the slideshow to fill the full browser window by specifying the width and height with $(document).width() and $(document).height() and everything works as desired. Code below:

Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');
$("#gallery").galleria({
    width: $(document).width(),
    height: $(document).height()
});

I also put in the following code to handle when the window is resized:

$(window).resize(function() {
    location.reload();
});

That works but it does a full screen refresh and isn't as elegant as Galleria's implementation, http://galleria.io/themes/fullscreen/. Is there a way to resize the slideshow without having to reload the entire page using the default skin?

WD-40
  • 319
  • 2
  • 7
  • 18

2 Answers2

1

I don't have a way to test this. But something like this may be worth a shot.

var gal = $("#gallery").galleria({
    width: $(document).width(),
    height: $(document).height()
});  

$(window).resize(function() {
      gal.width = $(document).width();
      gal.height = $(document).height();
});
Jason
  • 11,435
  • 24
  • 77
  • 131
1

Turns out if I use the extend functionality I can set the slideshow to be full screen and it will automatically resize when the window is resized without reloading the full page.

$("#gallery").galleria({
    width: $(document).width(),
    height: $(document).height(),
    extend: function() {
    this.enterFullscreen();
    }
});
WD-40
  • 319
  • 2
  • 7
  • 18