Answer the question
In order to leave comments, you need to log in
jquery gallery jquery.lightbox-0.5.js not working on server. How to run it?
I hook up the gallery with this script
jQuery(function(){
jQuery(".gallery").lightBox({
fixedNavigation: true
});
});
When I click on an image, it does not open in a modal window, but on a new page.
Although when I launch a page with a gallery, everything just works in the browser. And on yii2 in the console it gives this error
Uncaught TypeError: $(...).lightBox is not a function
Answer the question
In order to leave comments, you need to log in
1. Check the order in which the script is loaded - you may be calling a function when it hasn't loaded yet. (probably this)
2. Check which version of jquery is required for your script, and which one it costs.
3. Try replacing all "$" with "jQuery" (be careful not to mess up the syntax), or google jQuery noconflict
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question