3

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...*/
});
Siarhey Uchukhlebau
16.2k11 gold badges57 silver badges89 bronze badges
asked Jun 28, 2017 at 7:20

1 Answer 1

0

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

answered Jun 28, 2017 at 7:25
4
  • not working..!!! Commented Jun 28, 2017 at 9:45
  • yes js file is calling but i have face some module related error..like Uncaught Error: Mismatched anonymous define() module.... Commented Jun 28, 2017 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 Commented Jun 28, 2017 at 10:04
  • have you got solution of it? Commented Nov 20, 2017 at 7:49

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.