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,
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.
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,
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?
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.
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?
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.