meanmenu + nuxtjs

RafaelGSS
0
RafaelGSS
commented 24 days ago

Hello everyone.

I would like use meanmenu jQuery on my application NuxtJS. But, i don't understanding how to work the plugins.

I trying like bellow:

nuxt.config.js

plugins:[
      '~plugins/meanmenu-import'
    ]

plugins/meanmenu-import.js

import Vue from 'vue'

import * as js from 'meanmenu.js'

Vue.use(js);

plugins/meanmenu.js

The raw content of: https://github.com/meanthemes/meanMenu/blob/master/jquery.meanmenu.js

Just copy paste.

--

I using on content like:

export default {
    mounted() {

     /* jQuery MeanMenu */
    $('#mobile-menu-active').meanmenu({
        meanScreenWidth: "991",
        meanMenuContainer: ".mobile-menu-area .mobile-menu",
    });

    }
}

And receive the error:

$(...).meanmenu is not a function
0
Informations
Question โ€ข Unresolved
#c118 - Created 24 days ago