[Vuejs]-Laravel โ€“ How to add jQuery plugin to .vue view?

0๐Ÿ‘

โœ…

you should install jquery and scrollify plugin as module via npm :

npm i jquery --save 
npm i jquery-scrollify --save 

then import into your vue file :

import $ from 'jquery'

$.scrollify({
    section : ".example-classname",
});

and you dont need to put in

$(function() {})

just put your code directly in mounted function:

  mounted() {
                $.scrollify({section : ".section",});
        }

Leave a comment