[3.0.3] mCustomScrollbar is not a function
See original GitHub issueSomething went wrong after last update. I’m getting “undefined is not a function” error when trying to initialize the plugin when using RequireJS
My current config:
requirejs.config({
paths: {
jquery: 'vendor/jquery/jquery.min',
scrollbar: 'vendor/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.concat.min',
[...]
File where the function is executed:
define([
'jquery',
'scrollbar'
], function () {
$(".someobject").mCustomScrollbar({
theme:"dark"
});
});
The above doesn’t happen when I load the plugin’s unminified version, along with jquery-mousewheel.
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Uncaught TypeError: $(...).mCustomScrollBar is not a function ...
I have solved the problem, somehow my subconscious forgot Javascript was case sensitive... the function should read: $(scrollPane).
Read more >Uncaught TypeError: $(...).mCustomScrollbar is not a function
Hi everyoneI tried to load both pdf and word document when a page load but the document is not showing Here is the...
Read more >jQuery custom content scroller – malihu | web design
After files inclusion, call mCustomScrollbar function on the element ... The scrollbar moves, but the text is fix and it does not move....
Read more >malihu custom scrollbar for Bootstrap 4 Daemonite - JSFiddle
Highly customizable custom scrollbar jQuery plugin, a creation of <a href="https://github.com/malihu/malihu-custom-scrollbar-plugin" ...
Read more >3.9.18 update: mCustomScrollbar is not a function
13 to 3.9.18. My joommap component, which I guess is using mCustomScrollbar? is a little broken now. I'm getting the error: Uncaught TypeError: ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Instead of jquery.mCustomScrollbar.concat.min.js use js/jquery.mCustomScrollbar.min.js which loads mouse-wheel plugin with RequireJS.
Ok. I’ve just updated jquery.mCustomScrollbar.concat.min.js so it doesn’t conflict with RequireJS (re-download v3.0.3 and use it as before).
In addition, jquery.mCustomScrollbar.js also loads mouse-wheel plugin with RequireJS (script id: jquery-mousewheel).