Topic: take ConfigUrl from page URL #tag

I'm trying to find a way to switch between multiple galleries on a single html-page. The idea is to have multiple galleries, but only display one gallery at a time, while using a single html-page.

Am I right in believing that this should be possible by adding a few lines to the JB embed script that read the hashtag from the url and point JB to the correct config.xml?

So gallery.html would contain links to gallery.html#europe and gallery.html#usa.

Then the embed script would need to point #europe to ConfigUrl europe.xml and #usa to usa.xml.

Obviously, I would still have to manually alter the names of the xml files and sort the folder structure, but this is not too much work.

Thanks!

Re: take ConfigUrl from page URL #tag

You could use embedding code such as:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
    new juicebox({
        containerId : 'juicebox-container',
        configUrl : window.location.hash.substring(1) + '.xml'
    });
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

Then if you had two XML files named 'gallery1.xml' and 'gallery2.xml', then you could load Gallery #1 (pointing Juicebox towards the 'gallery1.xml' file) by using the URL 'index.html#gallery1'.