Is there a way to have the back button go to a relative URL, which would be, for example : /e/
and which would work for both sub-domains (mobilef.grantsymon.com + mobile.grantsymon.com)?
You could certainly set the backButtonUrl to use a path starting with a leading slash (to denote your root directory).
This should work on whatever domain (or subdomain) the gallery is on.
However, this will work only within the iframe.
You could perhaps attach a custom click handler to the Back Button icon class and load the URL (starting with the leading slash to work on both your subdomains) as the 'top' window (replacing the iframe and its parent page) using JavaScript.
You could try using embedding code such as the following:
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
// Give your 'juicebox' object a variable name (in this example 'jb') so that you can refer to it later
var jb = new juicebox({
containerId: 'juicebox-container',
backButtonPosition: 'TOP',
backButtonUseIcon: 'TRUE'
});
// Attach the click handler to the Back Button icon class when the gallery is ready
jb.onInitComplete = function() {
$('.jb-go-back').click(function() {
// Load the URL as the 'top' window (replacing the iframe and its parent page)
window.top.location.href = '/e/';
});
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->Hopefully you will be able to implement this within your project.