question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[3.0.3] mCustomScrollbar is not a function

See original GitHub issue

Something 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:closed
  • Created 9 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
malihucommented, Jul 30, 2014

Instead of jquery.mCustomScrollbar.concat.min.js use js/jquery.mCustomScrollbar.min.js which loads mouse-wheel plugin with RequireJS.

1reaction
malihucommented, Jul 31, 2014

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).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found