This is not something that Juicebox was designed to do but it should be possible with help from the Juicebox-Pro API.
You'll need to edit your gallery's embedding code, though.
There are no configuration options which you can set to make this happen.
If you want to redirect the user to a custom web page when the last image in the gallery has been reached, then try something like this:
<script type="text/javascript">
var jb = new juicebox({
backgroundColor: "rgba(0,0,0,1)",
containerId: "juicebox-container",
galleryHeight: "100%",
galleryWidth: "100%"
});
jb.onInitComplete = function() {
var imageCount = jb.getImageCount();
jb.onImageChange = function(e) {
if (e.id === imageCount) {
window.location.href = 'http://www.example.com';
}
};
};
</script>
If you want to introduce a delay (so that the last image can be seen for a set amount of time before the redirection happens), then try the following, changing the delay time of 5s (500ms) to whatever you like:
<script type="text/javascript">
var jb = new juicebox({
backgroundColor: "rgba(0,0,0,1)",
containerId: "juicebox-container",
galleryHeight: "100%",
galleryWidth: "100%"
});
jb.onInitComplete = function() {
var imageCount = jb.getImageCount();
jb.onImageChange = function(e) {
if (e.id === imageCount) {
window.setTimeout(function() {
window.location.href = 'http://www.example.com';
}, 5000);
}
};
};
</script>
If you want the redirection to happen only when the last image has been reached via AutoPlay (and not by user navigation), then try the following, which also includes the delay:
<script type="text/javascript">
var jb = new juicebox({
backgroundColor: "rgba(0,0,0,1)",
containerId: "juicebox-container",
galleryHeight: "100%",
galleryWidth: "100%"
});
jb.onInitComplete = function() {
var imageCount = jb.getImageCount();
jb.onImageChange = function(e) {
if (e.id === imageCount && $('.jb-bb-btn-auto-play').first().hasClass('jb-status-playing')) {
window.setTimeout(function() {
window.location.href = 'http://www.example.com';
}, 5000);
}
};
};
</script>
I hope this helps and points you in the right direction.