[SOLVED] How to use jquery in vue of framework7

I use jquery in vue of framework7, but there has several problem. My code as follow :


the error message is :

vue.esm.js:591 [Vue warn]: Error in created hook: "TypeError: that.$ is not a function"

please help me.

Apparently it says what it is. that.$ is not defined. Probably you haven’t installed it correctly

Hi Vladimir, thank u for ur reply. You said I had not installed it correctly. But u did not tell my how to install it correctly. I use following command to install :

"npm i jquery --save-dev "

I will appreciate it if u answer again.


import {$,jQuery} from 'jquery';
// export for others scripts to use
window.$ = $;
window.jQuery = jQuery;

Read this

1 Like

Hi Aleksey, Thank u for ur reply. The follow code is ok.

new webpack.ProvidePlugin({
  $ : "jquery",
  jQuery : "jquery"