We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24962
    • 18 Posts
    Is it possible to have two galleries running independently on the same page?

    I'm running MODX Revolution 2.1.3-pl (traditional), with the Gallery & phpThumbOf packages/snippets.

    The page has been set up to display the thumbnails of two separate galleries on a page, which open in a lightbox when clicked, however, when clicking through the galleries they loop through both sets of images instead of just one set - if that makes sense?

    Example is here: http://alturl.com/wafvd

    Any ideas if this can be stopped?
      • 40447
      • 165 Posts
      This can easily be done if you bring, for each gallery, the <ul> <li> and <a> elements into separated css classes.
        • 24962
        • 18 Posts
        I've managed to sort this.
        Using this JQuery Lightbox plugin: http://leandrovieira.com/projects/jquery/lightbox/
        Set a different ID for the containing div of the gallery and added the following to the script:
        <script type="text/javascript">
        $(function() {
        $('#gallery a').lightBox({fixedNavigation:true});
        $('#gallery1 a').lightBox({fixedNavigation:true});
        });
        </script>
          • 24962
          • 18 Posts
          <script type="text/javascript">
          $(function() {
           $('#gallery a').lightBox({fixedNavigation:true});
           $('#gallery1 a').lightBox({fixedNavigation:true});
          });
          </script>