-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: gallery.justifiedGallery is not a function #66
Comments
Can you show how you included the gallery into your markdown file? |
There are two versions of jQuery loaded on your page, one from hugo-shortcode-gallery (jquery-3.7.1.min.js) and another, probably from your theme (jquery.min.js). Having two versions of jQuery in parallel will lead to errors. You can tell hugo-shortcode-gallery not to load it's own jQuery, but to use the jQuery provided by your theme. To do this, simply remove the loadJQuery parameter from the shortcode. |
I have the same problem. I'm using the universal theme and the latest hugo version. I've included it with the following shortcode All resources load correctly (take a look at screenshot) and only in Console I see
I don't know what to do. Do you have an hint for me? |
@rhizoet Have you tried removing |
Yes, I've tried. But then I get So I think I must enable jQuery. |
Yes, I have tried that but I get the exact same error.
…On January 21, 2024 1:25:11 PM PST, Marius ***@***.***> wrote:
Yes, I've tried. But then I get
`Uncaught ReferenceError: jQuery is not defined`.
So I think I must enable jQuery.
--
Reply to this email directly or view it on GitHub:
#66 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
…de-gallery does not break anything (fix for #66)
This is most likely due to your website/theme loading a second instance of jQuery after the gallery has been partially initialised. I have implemented something that should prevent the gallery from breaking in such cases, its on the jquery-loading-robustness branch. Together with |
@mfg92 Thank you very much for your hard work. It works perfectly on my sites. |
Are you sure you have checked out the jquery-loading-robustness branch? |
…de-gallery does not break anything (fix for #66)
…de-gallery does not break anything (fix for #66)
…de-gallery does not break anything (fix for mfg92#66)
I installed the shortcode using hugo modules. When I attempt to run the shortcode nothing shows up on the screen. To be fair im a bit new to this.
Here is the error I see in the console
This is he HTML that loads. I can see the picture there.
The gallery is supposed to be between the heading and the social media buttons.
Can anyone please help me?
The text was updated successfully, but these errors were encountered: