You're welcome!

I'm glad it worked for you. I'll mark this topic as [SOLVED].

If you do not want the URL to display the #, set enableDirectLinks="FALSE" (in JuiceboxBuilder-Pro's 'Customize -> General' section).
FALSE is the default value for this configuration option, as seen here but your gallery currently sets enableDirectLinks="TRUE".

Incidentally, when setting enableDirectLinks="FALSE", you can still link to a specific image via a # in a URL (for example in an <a> tag) but the URL will not automatically display the # when the gallery is viewed (unless the gallery is viewed via a link with a #).

303

(3 replies, posted in Juicebox-Lite Support)

Hello, thank you for your help,

You're welcome!

... it works now!

That's great! Thank you for letting me know.

304

(3 replies, posted in Juicebox-Lite Support)

There is a problem with your gallery's 'config.xml' file.
There is a control character (not a regular text character) in the middle of the image title for the 16th image in your gallery ("14 - Potion fb.jpg").
If you view your gallery's 'config.xml' file directly in a browser (https://maelys-tremblay.fr/Galerie/inkt … config.xml), the browser will let you know at what point in the file the error occurs (Line Number 167, Column 41).
In Firefox, when I view your gallery's 'config.xml' file, I see the following (if there were no errors, you'd see the code for the whole file).

XML Parsing Error: not well-formed
Location: https://maelys-tremblay.fr/Galerie/inkt … config.xml
Line Number 167, Column 41:
    <title><![CDATA[Inktober 2020 - Jour14 - Potion]]></title>
----------------------------------------^

The control character is a STX (start of text) character but I do not know how it got in there (maybe you copied and pasted the image title from another source?).

In any case, if you delete the image title for image #16 ("14 - Potion fb.jpg") and enter it again (just type it in this time rather than copying and pasting from the original source), then all should be well.

Please let me know how you get on and if I can be of any further assistance.
Thank you.

305

(3 replies, posted in Juicebox-Pro Support)

The ability to create a Multi-Size Image gallery is a feature of JuiceboxBuilder-Pro only.
Unfortunately, it is not possible to create a Multi-Size Image gallery with the Juicebox-Pro Plugin for Lightroom.
The Lightroom API (which all plugins use) does not feature a way to selectively generate extra image sizes.

@chris.jones-gill

Thanks so much for documenting and sharing this!

I've mentioned using a function to load galleries into tabs before (it's no doubt buried somewhere deep within the forum in a years-old thread) but not in this detail and not with specific reference to Bootstrap v5.1 so this is very useful.

I hope it helps other users in a similar situation.

Thanks again!

307

(1 replies, posted in Juicebox-Pro Support)

Hi.

I think you've come to the wrong place. This is a support forum for Juicebox-Pro (web gallery software).
I can't find any instance of your name or email address in our transaction records and your query does not relate to Juicebox-Pro.
Try 'Settings -> Camera -> Grid'. Otherwise, a web search or an iPhone forum should point you in the right direction.

Best of luck!

We do not offer (and have never offered) a trial of Juicebox-Pro so I'm not sure where you are getting this information.
However, we do offer a money-back guarantee. Please see the FAQ below.
FAQ: Can I try a trial version of Juicebox-Pro?

You are free to download and use Juicebox-Lite (the free version) for as long as you like. Juicebox-Lite does not have all the features that Juicebox-Pro has (please see the comparison table on the Download Page) but your Juicebox-Lite galleries will never expire.

If, having created galleries with Juicebox-Lite, you choose to purchase Juicebox-Pro, you can upgrade Lite galleries to Pro by following the instructions on the Upgrading Juicebox support page.

I hope this helps to clarify things.
Please let me know if you have any further queries.
Thank you.

Now everything is working fine.

That's great! Thank you for letting me know.

Thanks again for you help.

You're welcome!

You can download the latest version of WP-Juicebox (v1.5.1.4) from the plugin's own support page here.
Here is a direct link to WP-Juicebox v1.5.1.4.

The version history page is here.

With reference to the points you mentioned:
(1) The 'Create Gallery' button was added to the Manage Galleries page in WP-Juicebox v1.5.1.1.
(2) WP-Juicebox v1.5.1.3 fixed a bug whereby the 'Add Juicebox Gallery' button did not display for the Gutenberg editor in WordPress 5.6.
(3) WP-Juicebox v1.5.1.4 fixed a bug whereby the 'Add Gallery' button did not work for the Classic editor (the gallery shortcode was not added to the page/post in the 'Visual' input mode).

With this in mind, if you use WP-Juicebox v1.5.1.4, you should be able to use Gutenberg or the Classic editor (and you'll have the 'Create Gallery' button as a backup if you run into any problems).
The Classic editor is no longer bundled with WordPress but you can download it as a separate plugin from its download page here. It is still maintained by the WordPress team.

Please note that WP-Juicebox comes bundled with Juicebox-Lite (the free version), so don't forget to upgrade the plugin to use you Juicebox-Pro files by following the 'Upgrading to Juicebox-Pro' instructions here.

Please let me know how you get on and if I can be of any further assistance.
Thank you.

311

(2 replies, posted in Juicebox-Pro Support)

Incidentally, WP-Juicebox never deletes any images.
Image handling is performed by core WordPress functionality or by the NextGEN Gallery plugin, depending on the image source selected for the gallery.
Even if you were to delete a gallery (or click 'Delete All Data') on the 'Manage Galleries' page, the gallery images would remain in their original locations (e.g. the WordPress Media Library) on your web server. All deleting a gallery does is remove the gallery's XML configuration file from the 'wp-content/uploads/juicebox/' folder.

... also the nextgen images no longer seem to exist...

If your NextGEN images no longer exist, then I expect the problem is either with the NextGEN Galery plugin or your web server so these are the first two things I'd look into.

Please let me know how you get on. Thank you.

312

(2 replies, posted in Juicebox-Pro Support)

That's very strange indeed.

... juicebox id's have diappeared and also the nextgen images no longer seem to exist...

That sounds like two separate issues which may or may not be connected.
I see no reason why any of your Juicebox gallery shortcodes would just disappear (or, indeed, why your NextGEN Gallery images would disappear) unless something has happened on your web server and your web host has maybe had to reinstate your site from an old or incomplete backup.
Please check in with your web host to see if they have made any changes or have experienced any problems recently.
Even if they have not done anything themselves, it might be an idea to ask if they have a backup of your site that could be used to reinstate your galleries.

Could you please point me towards one of your Juicebox gallery pages so that I can inspect the code and investigate further?
Even though the gallery may not be working or displaying images, examining the page might hold a clue as to the nature of the problem.
Thank you.

... or have the galleries themselves completely disappeared from the Manage Galleries page? I don't see how this could happen without clicking the 'Delete All Data' button and clicking through the "Are you sure you want to delete all galleries, custom default values and options?" warning (or by manually deleting the contents of the 'wp-uploads/juicebox/' folder).

Have you updated the NextGEN Gallery plugin lately? Maybe they have changed something lately which has broken the interaction between WP-Juicebox and itself (although this might not explain missing images).
If so, try reverting to an older version of NextGEN Gallery, at least for testing purposes, to see if this resolves the issue.

There has been no change to the NextGEN Gallery integration code within WP-Juicebox for a while now (since v1.4.3.1, 10 releases ago) so upgrading WP-Juicebox should not make a difference in this regard.

Once I am able to see one of your Juicebox gallery pages on your web server, I should hopefully have a better idea of what might be causing your problem.
In the meantime, checking in with your web host to see if they have changed anything recently relating to your site might hold a clue, too.

Thanks for your input! It's most appreciated.

Unfortunately, there are a couple of slightly different issues regarding local viewing so I think if the developers were to address the problem, they'd probably want to change the code to deal with the individual issues rather just push a new release with updated labels (although I agree that this would be a step in the right direction).

Being that I'm not the author of Juicebox and cannot make any changes myself, I think the best I can do is probably add a link to this forum thread from the FAQ that is already linked to from the Juicebox error message.
I've asked the developers if this would be OK. It might at least help users find a solution to the problem.

Hi.

I'm sorry that it took you so long to figure out the solution to the problem but I'm glad that you found this thread.

I've now stickied this topic so that it at least appears at the top of the 'Tricks and Tips' forum.

Maybe even change the Juicebox Builder Pro program where it says "view in browser" to put some kind of warning in.

That would, indeed, be the ultimate solution but, unfortunately, development is rather slow at the moment.

I'll contact the developers and see if there is any other way to increase relevant traffic to this thread.

Thanks.

315

(5 replies, posted in Juicebox-Pro Support)

I found the problem with the blank gallery, but still need help on the expand request creating a black screen.

That's great! Thank you for letting me know.

I will try your suggestion on the expand failure.

I'm fairly confident that the lack of a Doctype Declaration is the root of the problem.
I have been able to replicate the problem (using a gallery with exactly the same configuration options as yours)  by just removing the Doctype Declaration from the embedding page.
If you are having trouble adding the Doctype Declaration in FrontPage, just open the 'camp3.html' file in a plain text editor (such as Notepad++) and add:

<!DOCTYPE html>

... at the very top.
I'm not sure how FrontPage will react to a manually edited document when you next edit modify the page using FrontPage but all your HTML pages really ought to have Doctype Declarations and FrontPage ought to be able to handle this. It does not need to be the HTML 5 Doctype but it looks like the code on your web page is HTML 5 compliant. Maybe FrontPage does not recognise the HTML 5 Doctype if you add it manually but is perhaps able to use the older HTML 4.01 Doctype instead (which will be fine as long as FrontPage then goes on to generate HTML 4.01 valid code).
In any case, popping a Docytpe at the top of your gallery's embedding page should resolve the problem you're experiencing.

316

(5 replies, posted in Juicebox-Pro Support)

Thank you for providing the link to your gallery.

Here is a link to a gallery that expands successfully:

I think the problem is that your gallery's embedding page does not contain a Doctype Declaration.
It is important that each and every web page includes a Doctype Declaration (at the very top of the HTML document) to inform browsers of the set of standards that the code on the web page should conform to.
Looking at your gallery's web page ('camp3.htm'), it would appear that the most suitable Doctype would be HTML 5 so just add the following line of code at the very top of your 'camp3.htm' web page (and all other web pages within your site if they do not already contain a Doctype Declaration).

<!DOCTYPE html>

Make sure that the Doctype Declaration is the very first thing on the page (without even any whitespace before it), before the opening <html> tag.
More information about Doctype Declarations can be found here.

Also, I'm have a heck of a time finding out why this gallery displays as a blank with a rotating hexagon in center:

According to your gallery's 'config.xml' file, the first image in your gallery should be located here: https://www.jacksonforest.com/Logging_P … cn0122.jpg
However, going directly to that location in a browser (bypassing Juicebox), results in an error 404 (file not found).
Make sure that your images have been uploaded to the correct location on your web server and make sure that their permissions are not too restrictive. (Default permissions of 644 for folders and 755 for files should be fine.)

Also, if you have done any manual editing to your gallery's 'config.xml' file, check that the image filenames in the configuration file (the imageURL entries) exactly match the actual image filenames (in the 'images' folder), paying close attention to files extensions (lowercase vs uppercase) as, on a case-sensitive web server, .jpg is not the same as .JPG.

Also, try not to use spaces in your folder names (such as 'Photos_ North'... there's a space after the underscore) as, when in a URL, they need to be escaped (a space will likely show up as '%20' if you copy and paste the URL) and this can cause confusion (and sometimes problems).
Stick with web-safe alpha-numeric characters in the names of any files and folders that you upload to your web server and all should be fine.
Please see section 2.3 of this document for details.

Characters that are allowed in a URI but do not have a reserved purpose are called unreserved. These include uppercase and lowercase letters, decimal digits, hyphen, period, underscore, and tilde.

I hope these notes help you to resolve your problems.
Please let me know how you get on and if I can be of any further assistance.
Thank you.

317

(5 replies, posted in Juicebox-Pro Support)

I'd really need to see the gallery in question to troubleshoot your problem.
This is not a know issue so the problem is likely to be unique to your own gallery.
Please post back with a link to the dysfunctional gallery so that I can see the problem for myself and inspect the code and configuration options that you are using.
Once I am able to see the gallery live on your web server, I should hopefully be able to determine the cause of the problem and propose a solution.

In the meantime, the only two scenarios that I am aware of that would cause a problem (usually an error 404, file not found) when expanding a gallery are the following:

(1) When the gallery is being expanded in a new page (expandInNewPage=TRUE"), then an error will occur if the 'full.html' file (inside the gallery's 'jbcore' folder) is missing or corrupt. Try reuploading your gallery's 'jbcore' folder to see if this helps.

(2) When the gallery is being expanded in a new page (expandInNewPage=TRUE"), then an error will occur if the entire JavaScript portion of the embedding code is inside the gallery container. (This will only ever be the case if you have edited the gallery's embedding code yourself.) Make sure that your embedding code <script> tags are all outside the gallery container <div>.

I hope these notes help but, if not, just post back with the link to your gallery and I'll take a look and investigate further.
Thank you.

318

(1 replies, posted in Juicebox-Pro Support)

The short answer to both your queries is 'No'.
When clicking the Open Image button, Juicebox simply opens the image directly in a new browser tab.
This is the crux of the matter: it is just the image that is opened, not a web page containing the image.
There are no HTML tags into which a caption could be placed and, therefore, no <title> tag into which a custom browser tab title could be placed.
(This is why the image filename is used as the browser tab title. The image is the only element in the browser tab and the only thing that the browser can use for any content.)

The more elaborate answer to both your queries is 'Yes, but not easily'.
As you may have gathered from my answer above, you'd need to override the default handling of the Open Image button and use custom code to build a simple web page which will display the image and its caption (and allow a custom browser tab title to be used).

Here's an example of a possible solution.
To see this in action, create a sample gallery with JuiceboxBuilder-Pro and use the code below as the gallery's 'index.html' file.
This example first overrides the default handling of the Open Image. It then uses the Juicebox-Pro API to fetch the current image's caption, title and URL and then uses this information to build a basic web pageto be displayed when the Open Image button is clicked.
The image title is used for the browser tab title, the image is displayed (at its actual size) and the caption is displayed (in unstyled text) below the image. This is just a basic web page which you can use as a starting point and expand upon if you like.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" id="jb-viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
        <style type="text/css">
            body {
                margin: 0px;
            }
        </style>
        <script type="text/javascript" src="jbcore/juicebox.js"></script>
        <script type="text/javascript">
            var jb = new juicebox({
                containerId: "juicebox-container",
                showOpenButton: "TRUE"
            });
            jb.onInitComplete = function() {
                $('.jb-bb-btn-open-url').empty();
                $('.jb-bb-btn-open-url').off('click');
                $('.jb-bb-btn-open-url').on('click', function() {
                    var index = jb.getImageIndex();
                    var info = jb.getImageInfo(index);
                    var caption = info.caption;
                    var title = info.title;
                    var url = info.imageURL;
                    var win = window.open('', '_blank');
                    win.document.write('<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>' + title + '</title></head><body><img src="' + url + '"><p>' + caption + '</p></body></html>');
                    win.document.close();
                });
            };
        </script>
        <title>Test</title>
    </head>
    <body>
        <div id="juicebox-container"></div>
    </body>
</html>

As Juicebox was not designed with this in mind, it's not perfect. For example, it won't work from an expanded gallery.
However, I hope it helps somewhat and maybe points you in the right direction.

You're welcome!
I'm glad you've got it working. Thank you for letting me know. It's most appreciated!

320

(1 replies, posted in Juicebox-Pro Support)

If you are using JuiceboxBuilder-Pro to create your galleries and use the 'index.html' pages that Juiceboxuilder-Pro generates, then you can add your custom <meta> tags to the template file that JuiceboxBuilder-Pro uses to generate the 'index.html' pages.

Here's the file that you'll need to modify:
Mac: /Applications/JuiceboxBuilder-Pro.app/Contents/Resources/template/index.html
Windows: C:\Program Files (x86)\JuiceboxBuilder-Pro\template\index.html

Open the file in a plain text editor and add your custom <meta> tags somewhere between the <head> and </head> tags.

If you want to prevent browsers from caching your gallery's XML file, then try defining your gallery's XML file with a unique identifier (e.g. the current time which will be different each time the browser loads the page) using the configUrl option in your gallery's embedding code.

In the 'index.html' template file (location above), add the following code on a line of its own immediately after line 27 (new juicebox({).

configUrl: 'config.xml?nocache=' + new Date().getTime(),

Thank you very much for providing the link to your gallery's web page.
It is so much easier to troubleshoot a problem when I can see it live on a web server.

I see a few potential problems which I'll run through.

First of all, if I try to view the image that you are trying to use for your gallery's Back Button directly in a browser (https://galleries.ziegelmeyerphotograph … icebox.png), the browser presents a warning page (rather than the image itself) relating to an error with the SSL certificate for the domain that the image is on.
This is the reason for the broken image icon (where the Back Button should be) in the gallery.

If you click thorough the warning (in Firefox, it's 'Advanced -> Accept the Risk and Continue') and reload your gallery's web page, you'll see the image as expected.

The solution to this would be to sort out the certificate problem with the domain (or host the image elsewhere).

The next problem is that your backButtonText encloses the <img> tag in an <a> tag without a 'href' attribute.
The <a> tag overrides Juicebox's own handling of the BackButton (causing the backButtonURL to not be used) but the fact there the <a> tag does not have a 'href' attribute means that clicking the Back Button image will not redirect the user to anywhere.

Use just an <img> tag for your backButtonText (not something like <a><img ...></a>) and the backButtonURL will be used.

The next problem I see is that your logo is so large that, on my laptop screen, the Back Button image overlaps and obscures the thumbnails in the gallery.

I'd recommend making your logo a little smaller so that it does not obscure other gallery controls.
You can do this in the BackButtonText's <img> tag (without actually having to resize your image) with something like the following:

<img src="image.png" width="200" height="100">

(If you just use a 'width' attribute without a 'height' attribute (for example), then the image will be displayed at the specified width and the height will be automatically calculated respecting the image's aspect ratio.)

Finally, it's not a functional problem but you have a space before and after the URL in the <img> tags's 'src' attribute.
This is not going to cause any problems but the spaces should not really be there.

I hope these notes help you to resolve your problem.
Please let me know how you get on and if I can be of any further assistance.
Thank you.

322

(1 replies, posted in Juicebox-Pro Support)

If the caption area is positioned on the overlay (captionPosition="OVERLAY" or captionPosition="OVERLAY_IMAGE"), then the caption area will dynamically grow or shrink to accommodate the caption text up to a maximum height determined by maxCaptionHeight (default value 120px).

If the caption area is positioned anywhere else (captionPosition="BELOW_IMAGE", captionPosition="BOTTOM" or captionPosition="BELOW_THUMBS"), then the caption area will always be at a fixed height determined by maxCaptionHeight .

If you don't mind your caption text overlapping the images, then set captionPosition="OVERLAY" or captionPosition="OVERLAY_IMAGE" and increase the value for maxCaptionHeight.
(The overlay can be toggled on and off as long as showImageOverlay="AUTO").

For reference, short descriptions of all configuration options in bold above can be found on the Config Options support page.

If you want to actually change the font size for the caption text, then please see this forum post:
Changing font size of image titles and captions (and gallery title)

I hope this helps.

It might be a good idea if you alerted your other Customers to this issue; and perhaps provided some new downloadable Presets to address this problem?

It's certainly something for the developers to think about (I don't make design decisions around these parts), although the workarounds are simply to set either backButtonHAlign="CENTER" or useFullScreenExpand="FALSE" which are easy enough to implement.
Other more complex solutions, such as settings one of these configuration options conditionally (e.g. only in Mobile Safari on iPads running iOS 12 or later) can only be achieved through JavaScript and not simply through use of a preset.

Also, some people might actually like Apple's 'Exit Fullscreen' button! There are plenty of people on the internet who are vocal about it and want to try to disable it but it's probably only those who do not like it that have reason to post. Those that like the 'Exit Fullscreen' button are perhaps a silent majority.

In any case, this forum thread serves as a reminder of what can be done to work around the issue.
There should be enough keywords within this thread that anyone searching for the issue will end up here.

One other thing that i came across is that Adobe Dreamweaver is showing an Error on Line 14 of the JB Javascript.

The error that Dreamweaver reports is nothing to worry about.
An unnecessary semi-colon at the end of a line of JavaScript code will simply be ignored by browsers and is not a functional problem.
Also, it looks like the semicolon in question is actually being introduced by the packer we use to compile the JavaScript source code. (The semi-colon is not in our source code.)
The semicolon (line 14, column 246) comes after the closing '}' character of an 'if' block and immediately before the start of a 'while' loop.
If you enter any JavaScript code at all (e.g. var a;) into this online packer,, select the 'Base62 encode' checkbox and click the 'Pack' button, you'll see exactly the same thing (although at a different column number) in the packed output code.

So, essentially, it's nothing to worry about and nothing that we can do anything about unless we change our JavaScript packer (and one extra benign semicolon is perhaps not reason enough to change).

Thank you for reporting it, though. If it was a functional problem, we'd most certainly want to know.

You're welcome!

I'm really glad that you've found a solution that you're happy with.
Thank you for letting me know.

Just for clarification, it looks like Apple introduced Fullscreen API support (including the 'Exit Fullscreen' button) on the iPad in iOS 12 so, if you wanted to do a conditional check on the version of iOS being run, then iOS 12 or later is what you'd be looking for.

Here's a quote from Apple's Safari 12 Release Notes page:

Added support for viewing HTML elements in full screen on iPad.

I'm so sorry... I've just noticed there was a small but crucial error in the code I provided which might be causing some confusion.
I've corrected it in my post above (in case anyone copies it in the future).
The correct line of code should be:

var customPosition = isIPad() ? 'CENTER' : 'LEFT';

(Note the two brackets after 'isIPad'.)

I guess I was playing around with functions and variables before I decided on what to post and I ended up with a mismatch.
Anyway, if you change the line above, you'll find that the Back Button is centred only on iPads. On other devices (including desktops), the Back Button will be positioned to the left.

A couple of other notes which might help to clarify some things...

... and Apple's Horrible X has been obliterated!

The cross should not appear if you set fullScreenExpand="FALSE". If fullscreenExpand="TRUE", then the cross should appear, no matter what other configuration options are used.

However, the trade-off on a large-screen computer is that the images in a Gallery will no longer fill the Browser window (as you will see that they do in the original link to "Lemurs, Bronx Zoo" on the Landing-page.

I see no difference in the size of the images between your Bronx_Zoo and Bronx_Zoo-TESTING galleries (tested in a desktop browser).
Other than the position of the Back Button (which should be the same in both galleries after you change the code above), they seem identical to me.

It is probably not possible to further refine the Script to say, in effect:
"Ignore the Script unless the User is using Mobile Safari on a newer iPad" ?!!

It's possible to specifically target more recent versions of iOS but there seems to be no easy way to determine the version of iOS other than parsing the user agent string and there are many ways to do this.
There are several different examples on these pages:
https://stackoverflow.com/questions/757 … e/13549283
https://stackoverflow.com/questions/834 … javascript

I'm not sure in which version of iOS the fullscreen exit button was introduced but here's some code which should center the Back Button only on iPads running iOS 12 or greater you can change this version number in the code if you need to), with the Back Button positioned left in all other cases.

<script src="jbcore/juicebox.js"></script>
<script>

    function isIPad() {
        var agent = window.navigator.userAgent;
        return /iPad/i.test(agent);
    }

    function iOSVersion() {
        var agent = window.navigator.userAgent;
        var start = agent.indexOf('OS ');
        if (/iP(ad|hone|od)/i.test(agent) && start > -1) {
            var match = agent.match(/OS (\d+)_(\d+)_?(\d+)?/);
            var version = [parseInt(match[1], 10), parseInt(match[2], 10)];
            return parseFloat(version.join('.'));
        }
        return false;
    }

    var customPosition = isIPad() && iOSVersion() >= 12 ? 'CENTER' : 'LEFT';

    new juicebox({
        containerId: "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "rgba(204,204,204,1)",
        backButtonHAlign: customPosition
    });

</script>

You could do likewise with the useFullscreenExpand configuration option (using the Fullscreen API on all devices except the iPad) if you like.

<script src="jbcore/juicebox.js"></script>
<script>

    function isIPad() {
        var agent = window.navigator.userAgent;
        return /iPad/i.test(agent);
    }

    function iOSVersion() {
        var agent = window.navigator.userAgent;
        var start = agent.indexOf('OS ');
        if (/iP(ad|hone|od)/i.test(agent) && start > -1) {
            var match = agent.match(/OS (\d+)_(\d+)_?(\d+)?/);
            var version = [parseInt(match[1], 10), parseInt(match[2], 10)];
            return parseFloat(version.join('.'));
        }
        return false;
    }

    var fullscreen= isIPad() && iOSVersion() >= 12 ? 'FALSE' : 'TRUE';

    new juicebox({
        containerId: "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "rgba(204,204,204,1)",
        useFullscreenExpand: fullscreen
    });

</script>

I hope this helps.