When visiting the product page, for some reason the product image gets blurry and every button withing the red square (see image 1 for reference) becomes unclickable. By inspecting the page inside Google Chrome, i came across the error “Uncaught TypeError: $(…).flickity is not a function” (see image 2 for reference). Im not sure what to do next..
Check the website: www.autoverhuurgill.nl . Everything worked fine but one day the product page aren’t working properly.
“WhatsApp Chat” app loads, checks whether there is a jQuery, unsuccessfull, proceeds loading its own copy of jQuery (A).
In the meantime: theme loads own copy of jQuery(B), then vendor.min.js which contains flickity which extends jQuery(B).
Then jQuery(A) is finally loaded and it replaces the jQuery(B).
Most of the code works fine, because it needs only jQuery, but theme code which depends on flickity extension of jQuery – fails because extended jQuery(B) was replaced by vanilla jQuery(A).
You need to make sure that jQuery is loaded before any code which needs it.
In your theme there should be code similar to the following, somewhere at the bottom of the layouts/theme.liquid (I believe):
You need to move it towards the top of this file, somewhere above {{ content_for_header }}
Thanks for the quick response, i kinda get it but i haven’t been able to fix it properly. You were right about the placement of the code but maybe you can help me out, see below the actual code for “theme.liquid”