Topic: back button [SOLVED]
One more question.
I use back button URL to point to an additional document, so is it possible to add target="blank" attribute in xml file? If so, how?
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Pro Support → back button [SOLVED]
One more question.
I use back button URL to point to an additional document, so is it possible to add target="blank" attribute in xml file? If so, how?
The Back Button was designed for navigation within the same browser tab (like the browser's own back button).
However, there are a couple of things that you could do.
(1) Use the Gallery Title (instead of the Back Button) as a link using HTML formatting as noted in this FAQ.
How do I add HTML formatting to the Gallery Title or Back Button?
You could perhaps use a Gallery Title such as:
<a href="http://www.example.com" target="_blank">Click here</a>
(2) You could dynamically add the target="_blank" attribute to the Back Button's <a> tag using JavaScript and the Juicebox-Pro API as follows. (The onInitComplete() method is used to ensure the .jb-go-back class is present in the DOM before the target="_blank" attribute is added.)
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
containerId: 'juicebox-container',
backButtonPosition: 'TOP',
backButtonUrl: 'http://www.example.com'
});
jb.onInitComplete = function() {
$('.jb-go-back').children('a').first().attr('target', '_blank');
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->
Great! The second method is the only I will implement, since I need Gallery Title for a different purpose.
Thank you.
You're welcome!
I'm glad you've been able to implement one of my suggestions.
Juicebox Support Forum → Juicebox-Pro Support → back button [SOLVED]
Powered by PunBB, supported by Informer Technologies, Inc.