O
O
olezhenka2018-02-28 13:16:32
JavaScript
olezhenka, 2018-02-28 13:16:32

how to use jquery in nuxt

Added jquery to head.script: [ {src: ' https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.... '} ]
But when I include jquery plugin plugins: [ '~plugins/slider /slider.js' ]
error occurs $ is not defined

What to do?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ainur Valiev, 2018-03-01
@vaajnur

it says, "Nuxt.js allows you to include JS plugins that will be run before the Vue.js root application is instantiated."
include slider.js the same as jquery - in the head

A
AirGea45996, 2021-01-05
@AirGea45996

This is how you can connect jq
5ff3baa9e1c5f346477818.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question