deymbwoi
deymbwoi

Reputation: 135

How to use jQuery in VUE

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?

Upvotes: 2

Views: 3737

Answers (2)

Hans Felix Ramos
Hans Felix Ramos

Reputation: 4424

Import jquery in your vue component:

import $ from 'jquery'

Upvotes: 3

Rijosh
Rijosh

Reputation: 1544

Run the command to install jQuery

npm install --save

Now you can use it in your component by importing it

import $ from "jquery";

Upvotes: 1

Related Questions