I am trying to use Fotorama (photo gallery) in my project on vue-cli. jQuery 3.5.1 and Fotorama installed using NPM. Code part:
<script>
import 'jquery'
import 'fotorama/fotorama'
export default {
// ...
}
</script>
I get this error:
Uncaught Fotorama requires jQuery 1.8 or later and will not run without it.
How to make it work?
I was doing:
- Used jquery and fotorama of the same versions without vue. It works
- Used the cdn version by adding script tags to the mounted hook
- Put jquery and fotorama in assets folder. Vue shows me errors in jquery file
- Added script tags in index.html. It works 50/50. I can’t explain this, but this option works randomly when the page reloads.
- merged jquery and fotorama into 1 file
Sorry, if there are errors in my question, my English bad. I ask this question on the subdomain of my community, but they could not help me. Perhaps there are other libraries that provide such an opportunity. The main thing is that they weigh a little and know how to load pictures when scrolling (not all at once)
I was able to solve this problem.
It works fine! Thanks to everyone who tried to help