Answer the question
In order to leave comments, you need to log in
How to use jQuery and its plugins in Vue?
To begin with, I will say that I googled . I found how to connect jQuery plugins to it , but it doesn't work properly. JQuery itself works fine, but when I try to initialize the plugin, it crashes
Uncaught ReferenceError: jQuery is not defined
at eval (jaliswall.js?b0c2:118)
at Module../public/js/jaliswall.js (app.js:2404)
at __webpack_require__ (app.js:770)
at fn (app.js:130)
at eval (cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js&:4)
at Module../node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js& (app.js:933)
at __webpack_require__ (app.js:770)
at fn (app.js:130)
at eval (App.vue?c53a:1)
at Module../src/App.vue?vue&type=script&lang=js& (app.js:2428)
.....
import $ from 'jquery'
import '../public/js/jaliswall'
...
mounted: function () {
$('.main section.section.section-portfolio .wall').jaliswall({
item: '.wall-item',
columnClass: '.wall-column'
})
}
.....
Answer the question
In order to leave comments, you need to log in
here you can read how to use ProvidePlugin. Well, how to use jq in vue is a piece of g ... on
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question