For a Drupal Module

(function ($) {
  function doLayout() {
      var parentWidth = $('#jb').width();
      var galleryHeight = parseInt(parentWidth * 0.75);
      $('.juicebox-parent').height(parentWidth);
      $('.juicebox-parent').height(galleryHeight);
  }
  $(document).ready(function() {
    doLayout();
    $(window).resize(doLayout);
  });
})(jQuery);

#jb is a parent container, whose width is changing

Thank you, Steven, it's really helpful.

Hello

I want to know, if the lite or pro version can dynamically change the container height based on the current width. I need a responsive gallery that always has the same aspect ration.

In galleria you can set relative height, e.g. height: 0.75, and the gallery will be always at 4:3 ratio.