Thumblie Exhibeo Gallery - no images on click

Hi,

I’ve implemented a Thumblie gallery into a recent website.

For some reason, upon clicking the thumbnail for any image, the usual overlay with controls and large image that should display do not appear. Only the ‘X’ in the top left, and a white square.

Could anyone explain why this is happening? Thanks,

Jack

https://velmasimon.com/gallery.html

Hi Jack,

This is happening because a conflicting version of jQuery is being loaded on the page, so the version that the gallery relies on is not being loaded. There is a piece of jQuery on the page which looks like it’s meant to do something when a button is pressed, but it doesn’t obviously seem like this is actually being used.

If it’s not being used, you should be able to simply remove the reference to jQuery 3.3.1 from the page and the gallery will start working. If it’s driven by a template and that code is used on a different page however, it might be more complicated to deal with.

Simon

On Wed, Feb 24, 2021 at 4:58 PM idasu.uk <email@hidden> wrote:

Hi,

I’ve implemented a Thumblie gallery into a recent website.

For some reason, upon clicking the thumbnail for any image, the usual overlay with controls and large image that should display do not appear. Only the ‘X’ in the top left, and a white square.

Could anyone explain why this is happening? Thanks,

Jack

https://velmasimon.com/gallery.html

Hi Simon,

Thanks for your reply! The jQuery is being used but only at a mobile breakpoint. It’s the toggle for the menu button.
What do you think is the best way around this?

Thanks,

Jack

It looks to be compatible, i.e. your button code should work and behave the same way in both versions, so I think you should be able to just change the version number from 3.3.1 to 1.7 in the head.

Simon

On Wed, Feb 24, 2021 at 7:41 PM idasu.uk <email@hidden> wrote:

Hi Simon,

Thanks for your reply! The jQuery is being used but only at a mobile breakpoint. It’s the toggle for the menu button.
What do you think is the best way around this?

Thanks,

Jack

Hi,

I’ve changed to 1.7 in the , this fixes the Thumblie gallery but unfortunately breaks the toggleClass code.
Any ideas?

Thanks again,

Jack

Setting up the click handling is working:
$(“.btn”).on(“click”, function() {

However the code that gets executed when clicking is failing because $ is undefined:

$(‘.menu’).toggleClass(“show”);
$(‘.btn’).toggleClass(‘close’);

It looks like what’s happening is that .on() is being used before the gallery has been set up and then the gallery is, I think incorrectly, triggering jQuery noConflict which undefines $, so it becomes unavailable by the time the button is clicked. On those three lines, replacing “$” with “jQuery” should solve that.

I’ll log a task to investigate that, as I’m pretty sure it has no need to be doing it.

Simon