How to use jQuery in VUE

Viewed 2127

I'm trying to recreate this sticky column html table https://codepen.io/paulobrien/pen/gWoVzN

I've run npm install --save jquery. I've used it on mounted. But it seems to not work.
Any idea how to implement jquery inside vue js?

2 Answers

Import jquery in your vue component:

import $ from 'jquery'

Run the command to install jQuery

npm install --save

Now you can use it in your component by importing it

import $ from "jquery";
Related