2

I have use mCustomScrollbar jquery plugin but there some error have come & error like:

Uncaught Error: Mismatched anonymous define() module..

Help appreciated.

Thanks.

My mCustomScrollbar jquery plugin code:

define([
    'jquery',
    'mCustomScrollbar',
    'jquery/ui'
], function ($, mCustomScrollbar) {
    'use strict';

    /*mcustomScrollbar plugin code here...*/

});
1

Call js file in default_head_blocks.xml

#app/design/frontend/yourvendor/yourtheme/Magento_Theme/layout/default_head_blocks.xml

<script src="js/mCustomScrollbar.js"></script>

Place file under /app/design/frontend/yourvendor/yourtheme/web/js

  • not working..!!! – user11256 Jun 28 '17 at 9:45
  • yes js file is calling but i have face some module related error..like Uncaught Error: Mismatched anonymous define() module.... – user11256 Jun 28 '17 at 10:00
  • Please update your question with actual errors, because you have asked for adding of JS library . Right question will grab right person to help you – Manoj Deswal Jun 28 '17 at 10:04
  • have you got solution of it? – jack Nov 20 '17 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.