This website uses cookies to personalise ads and to analyse traffic ok
web design

jQuery custom content scroller



  • Jul 11, 2016
    • Updated plugin to version 3.1.5

      • Fixed issues #427, #416, #430.
      • Extended :mcsInSight plugin expression.
  • Jun 13, 2016
    • Updated plugin to version 3.1.4

      • Added new jQuery custom expression: ":mcsInSight".
      • Changed jQuery .load() functions for compatibility with jQuery version 3.0.
      • Increased mousewheel deltaFactor threshold which determines delta acceleration.
      • Optimized the function that checks the accessibility if iFrames.
      • Fixed issue #383.
      • Fixed issue regarding scrollTo method percentage value.
      • Fixed issue #391 (Firefox console error when dragging the scrollbar outside of window).
  • Nov 17, 2015
    • Updated plugin to version 3.1.3

      • Fixed issues regarding cross-domain iframes.
  • Nov 10, 2015
    • Updated plugin to version 3.1.2

      • snapAmount option can now be an array for setting different vertical and horizontal values (e.g. [y,x]).
      • Fixed issues regarding scrollbar dragging when element is within an iFrame.
      • New option added: extraDraggableSelectors.
      • Fixed issue #321.
      • Updated auto-update and primary scrolling functions to fix a bug regarding horizontal scrollbar resizing.
  • Oct 27, 2015
    • Updated plugin to version 3.1.1

      • New option added: documentTouchScroll.
      • Fixed bug ( regarding horizontal scrollbar dragging not triggering immediately.
      • Fixed a minor conflict between clicking the dragger rail while snapAmount option is used.
      • Fixed an issue regarding CSS max-height and media queries.
      • Optimized/fixed mouse-wheel scrolling on OSX (esp. using magic trackpad/mouse).
      • Included the latest version (3.1.13) of jquery-mousewheel plugin.
  • Oct 7, 2015
    • Updated plugin to version 3.1.0

      • Changed updateOnImageLoad option default value so it’s not triggered on vertical content.
      • Extended autoExpandHorizontalScroll option.
      • Updated/optimized auto-update function to prevent memory leak.
      • New callbacks added: onCreate, onBeforeUpdate.
      • Fixed issue #353 ( regarding Ms Edge and IE on touch devices.
      • Fixed issue regarding dragging text or elements out of the scrollable area (
      • Plugin is now better at handling CSS flexbox and elements with max-height using CSS calc().
  • Jun 9, 2015
    • Updated plugin to version 3.0.9

      • Pulled request #297 (fix Timers leaks –
      • Auto-detect OSX “natural” scrolling setting (where supported) and invert mouse-wheel automatically (for Safari browser).
      • New option added: autoUpdateTimeout.
      • Fixed issue #303 ( regarding mobile Google Chrome.
  • Mar 10, 2015
    • Updated plugin to version 3.0.8

      • Added Browserify support (
      • Fixed touch-swipe and keyboard scrolling for iframes (
  • Dec 29, 2014
    • Updated plugin to version 3.0.7

      • Fixed issue regarding scrolling by touch-swiping content in touch-enabled Windows devices.
      • Fixed bug regarding page scrolling when touch-swiping content with scrollbars in Android OS.
      • Setting alwaysShowScrollbar option to 1 will now keep scroll buttons visible.
      • Fixed issue
  • Nov 30, 2014
    • Updated plugin to version 3.0.6

      • Changed the timeout of binding the mouse-wheel event from 1000 to 100 milliseconds.
      • Fixed a minor issue regarding iframes in Firefox (
      • Change included mousewheel plugin version to 3.1.12.
      • Fixed/optimized various private functions.
      • New option added: scrollButtons:{ tabindex }.
      • New callbacks added: onUpdate, onImageLoad and onSelectorChange.
      • Added new custom jQuery expressions: ":mcsInView" and ":mcsOverflow".
      • Fixed scrolling while selecting content (
  • Oct 21, 2014
    • Updated plugin to version 3.0.5

      • Updated touch-swipe scrolling functionality. For example, the script will not prevent document scrolling when swiping vertically on elements with horizontal scrollbar or prevent zooming when 2 fingers are detected.
      • Updated the script to allow using browser’s “find on page” functionality.
      • Fixed issues regarding RequireJS.
      • New callback added: onInit (triggers when the scrollbars have initialized).
      • New option added: advanced:{ releaseDraggableSelectors }.
      • Updated script’s custom js tween function.
  • Sep 6, 2014
    • Updated plugin to version 3.0.4

      • Fixed issue of scrolling being too fast on OSX trackpads (issue:
      • Added mouse-wheel support for IE/Firefox over iframes that allow access.
      • Added option timeout to scrollTo method in order to easily change scroll-to default 60 milliseconds delay.
      • New callbacks added: onOverflowY, onOverflowX, onOverflowYNone and onOverflowXNone.
      • The plugin script will initialize mcs object without the need to trigger callbacks first.
  • Jul 29, 2014
    • Updated plugin to version 3.0.3

      • Added css and image files to main in bower.json file (
      • Added support for RequireJS (
      • Added an extra condition which checks if the scrollbar is ready to use mousewheel events (
  • May 30, 2014
    • Updated plugin to version 3.0.2

      • Fixed issue regarding scrolling over focused select element (
  • May 30, 2014
    • Updated plugin to version 3.0.1

      • Development script jquery.mCustomScrollbar.js appends jquery mousewheel plugin script in head tag (instead of body).
      • Removed jQuery object .selector property (issue: Object.selector will be used (if it exists) only when live option is true and liveSelector option is not set.
      • New option parameter added: liveSelector (specify a selector for the live option).
  • May 21, 2014
    • Updated plugin to version 3.0.0

      • Changed license to MIT
      • Re-written/optimized code.
      • Script adds scrollbars automatically on any element with class mCustomScrollbar.
      • Added object for detecting if custom scrollbar script is loaded: window.mCustomScrollbar.
      • Added object to allow setting plugin default options, e.g. $.mCustomScrollbar.defaults.scrollInertia=500;.
      • Changed set_width and set_height options to setWidth and setHeight.
      • Changed horizontalScroll option to axis.
      • New option parameter added: scrollbarPosition.
      • Dragger rail click scroll amount changed to match browser’s native scrollbar behavior.
      • Fixed problems with scroll on input focus (issue:
      • New option parameter added: deltaFactor.
      • Deprecated mouseWheelPixels, scrollButtons:{scrollSpeed}, advanced:{normalizeMouseWheelDelta} options.
      • Fixed issues and enhanced content touch-swipe scrolling function.
      • Fixed IE8 issue: content gets selected upon scroll
      • Added keyboard scrolling support.
      • Extended alwaysShowScrollbar option parameter.
      • New option parameters added: setTop and setLeft.
      • Extended scrollTo method position parameter.
      • Extended and fixed mcs variable (issue:
      • Callbacks won’t trigger when scrolling is 0 or 100%.
      • Removed window resize events and options.
      • Added support for RTL direction.
      • New option parameter added: alwaysTriggerOffsets.
      • New option parameter added: autoExpandScrollbar.
      • Added more ready-to-use themes.
      • New option parameter added: live.
      • New option parameter added: mouseWheel:{ invert }.
      • New option parameter added: advanced:{ updateOnSelectorChange }.
      • New option parameter added: advanced:{ updateOnImageLoad }.
      • Changed"mCS_trigger") to"mCS").trigger
  • May 19, 2014
    • Updated plugin to version 2.8.7

      • Increased mouse-wheel “auto” scrolling amount.
      • Fixed scrollbar dragging over iframes.
      • Fixed sub-pixels related issues.
  • May 14, 2014
    • Updated plugin to version 2.8.6

      • Fixed timeouts/intervals not clearing when scrollbar is destroyed (
      • Added extra condition preventing multiple plugin instantiations on a single element.
  • May 8, 2014
    • Updated plugin to version 2.8.5

      • Optimize scrolling when trackpad is used (issue:
      • scroll to element by js/jquery element object (issue:
      • Watch content size as well as container size (issue:
      • Change max-height function to take into consideration any padding applied to the DIV container (issue:
      • Fix window resize (issue:
      • Small bugfix and Mousewheel version update (issue:
      • Add ondragstart/ondragstop event handlers (issue:
  • Nov 19, 2013
  • May 9, 2013
    • Updated plugin to version 2.8.2

      • Plugin license changed from GPL to L-GPL.
      • Merged pull request which adds few extra options that allow a better scrollbar snapping to multiples of number of pixels.
  • Mar 13, 2013
    • Updated plugin to version 2.8.1

      • Plugin license changed from CC to GPL.
      • Fixed few minor bugs and issues.
  • Mar 7, 2013
    • Updated plugin to version 2.8

      • Removed GSAP dependencies. Plugin does not require GSAP JS TweenLite/CSSPlugin anymore.
      • Fixed CSS file for horizontal/vertical nested scrollbars.
      • New option parameter added: normalizeMouseWheelDelta (normalizes mouse-wheel delta to -1/1).
      • New option parameter added: contentTouchScroll (scrolling by touch-swipe content).
      • Script unbinds window resize event for destroyed scrollbars.
  • Feb 22, 2013
    • Fixed an issue with max-height/width.
  • Feb 20, 2013
    • Updated plugin to version 2.7

      • Removed jQuery UI dependency. Plugin does not require jQuery UI anymore.
      • Added support for jQuery version 1.9
      • Added support for Microsoft Windows based touch devices (via MSPointer events).
      • Added support for nested scrollbars (any amount, any level).
      • Custom scrollbars can now be applied directly on body tag.
      • Added GSAP JS TweenLite & CSSPlugin dependencies. All animations in the script have moved from jQuery $.animate to GSAP JS TweenLite. Scrolling is much smoother and performance is significantly better (at least twice the FPS). Callback functions also perform much better (with less code).
      • Dragger bar has now the same animation easing effect as content.
      • New method added: stop (stops current running scrolling animations).
      • New option parameter added: autoHideScrollbar (hides scrollbar when idle and/or mouse-out).
      • Mouse-wheel scrolls the document when a custom scrollbar has reached its scrolling limits (same behavior as browser native scrollbars).
      • Mouse-wheel and scrolling buttons default speed is set to "auto" (script auto-adjusts pixels scrolling amount according to content’s length).
      • Setting CSS max-height/max-width in percentages bug is fixed.
      • All callback functions return the following values: this (the current element), (content’s top position), mcs.draggerTop (scrollbar dragger’s top position), mcs.left (content’s left position), mcs.draggerLeft (scrollbar dragger’s top position), mcs.topPct (content vertical scrolling percentage), mcs.leftPct (content horizontal scrolling percentage).
      • Added scrollInertia option parameter to scrollTo method (set your own scrollInertia values for each scrollTo call).
      • Added a number of ready-to-use scrollbar themes. You can easily select a theme by setting the theme option parameter to the one you want.
      • Updated jquery.mCustomScrollbar.css with themes and some minor CSS changes for .mCSB_draggerContainer.
      • Other minor code optimizations and bug fixes.
  • Dec 19, 2012
    • Fixed code for elements with max-height/width.
  • Nov 28, 2012
    • Added content touch-scrolling support.
  • Nov 26, 2012
    • Updated plugin to version 2.3

      • Added touch support to custom scrollbar so it looks and functions the same on all devices (desktops, laptops, tablets, phones etc.) which support javascript touch events.
      • New methods added: disable (temporarily disables the scrollbar) and destroy (completely removes the scrollbar).
      • Auto-scrolling on element focus can now be enabled/disabled via option parameter.
      • Changed mousewheel and buttons scrolling to a fixed pixels amount (same behavior as native scrollbars).
      • Setting CSS max-height/max-width (without height/width) applies the custom scrollbar correctly when max-value is reached.
      • New callbacks added: onScrollStart, onTotalScrollBack and whileScrolling.
      • Changed few data objects names.
      • Other minor code optimizations.
  • Nov 7, 2012
    • Added top limit for scrollTo method.
  • Jul 27, 2012
    • Fixed an issue regarding content position updating. Updated plugin to version 2.1.
  • Jul 24, 2012
    • Added support for Android version 2.xx plus minor code optimizations.
  • Jul 19, 2012
    • Changed auto-scroll to selected/active anchors, only if they have a tabindex attribute set.
  • Jul 14, 2012
    • Updated plugin to version 2.0

      • Plugin script completely re-written to support multiple selector types, option parameters and methods.
      • Added user defined custom callback functions.
      • Added support for touch devices.
      • Fix for fast scrolling bug on Safari (OSX) is now included in the plugin script.
      • Added scroll-to functionality via “scrollTo” method.
      • Updated scroll buttons to scroll continuously or by number of pixels.
      • Added some advanced parameters for auto-updating scrollbar on content resize and auto-expanding container width on horizontal content blocks.
      • Added update method to update scrollbars manually when necessary.
      • Fixed scrolling while page is zoomed in or out in webkit browsers.
      • Selecting elements with the TAB key auto-scrolls content to the selected element position.
      • Included additional demos and examples in the plugin archive.
  • Dec 14, 2011
    • Updated demo and download archive with the updated mousewheel plugin (version 3.0.6), in order for mousewheel to work with jquery 1.7
  • Apr 13, 2011
    • Fixed a bug regarding pressing-dragging-releasing scroll buttons
  • Feb 23, 2011
    • Automatically setting content width for horizontal scrollers is no longer calculated via javascript.
      Instead of using jQuery .each() or for statements, the width is now set by adding an additional div (.horWrapper) that wraps content and by setting the display of .container div to inline, expanding its width automatically (check the updated css file for details)


Pages: 1 2 3 4


Post a comment

Comments pages: 1 80 81 82

  1. Sunil Kumar
    Posted on May 9, 2019 at 15:45 Permalink

    Hi I am trying to achieve a parallax effect in the website, from the section (A life of adventure), I have achieved the parallax effect from the library rellax.js, however looking to achieve the smooth scroll effect, can you guide me

    Sunil Kumar

  2. Nicky
    Posted on April 9, 2019 at 16:19 Permalink

    Looks like author stopped supporting project

  3. leomn
    Posted on March 25, 2019 at 10:30 Permalink

    In JS code file, I prepare a scroll container: $scrollWrapper and a button: $scroll , and set the scrollbar invisible and disabled mouseWheel to scroll the container,because the container is suposed to scroll via other actions.Then when the code is writtend like:
    function scroll(){ $scrollWrapper.mCustomScrollbar('scrollTo','right'); } scroll();
    the container scrolls,but
    function scroll(){ $scrollWrapper.mCustomScrollbar('scrollTo','right'); } $;
    it doesn’t.
    Can you help me to figure it out?

  4. Jone Manuilov
    Posted on March 21, 2019 at 11:36 Permalink

    Can I make horizontal block scroll by holding the mouse button, as to drag the block contents with the mouse

  5. Dario de Judicibus
    Posted on February 27, 2019 at 14:36 Permalink

    Very nice plugin but in the latest version of Chrome and Firefox there are several problems like this that prevent using the plugin:

    Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See

  6. saisudhakar
    Posted on February 14, 2019 at 09:25 Permalink

    I am very thankful to you for this plugin. I’ve an issue in my site . The problem is when i append li to ul each is not working properly.

    advanced:{ updateOnSelectorChange: “ul li” }

    Please help me to resolve update scrollbar.

    Thanks in advance for your help.

  7. Kris
    Posted on January 26, 2019 at 05:51 Permalink

    Is there any way to have the dark-3 scrollbar theme outside of a container div instead of inside?

  8. Camille
    Posted on January 24, 2019 at 11:37 Permalink


    Thank you for your plugin!

    I’ve an erratic behavior: the scroll bar switch between show and hide indefinitly.
    It seems related to the switch between those 2 CSS rules:
    .mCSB_inside > .mCSB_container { margin-right: 30px; } .mCSB_container.mCS_no_scrollbar_y.mCS_y_hidden { margin-right: 0; }

    Do you already have this issue?

    Thank a lot for your help.


  9. Mehdi
    Posted on January 13, 2019 at 20:01 Permalink

    Hello, thanks for this great job! It is very flexible and would have solution for most cases.
    I used it in a website as :
    In homepage, at second section, I put it for wrapper contains pictures.
    While page width going to be small, it starts to work as well.
    But my question is for mobile devices.
    In mobile device, when scrollbar is on top of wrapper, body does not scroll to top.
    How do I fix this?
    Thanks again

  10. Deepika
    Posted on January 6, 2019 at 08:11 Permalink

    I have used this with autocomplete but scroll is not working with up and down keys.

  11. Andy
    Posted on December 7, 2018 at 02:45 Permalink

    Hello, I really like the scroll, it works fine on my environment but I got one question.

    My page not workink the link:

    Index.html page link:
    <a href="bio.html#subpage">Subpage</a>


    <script type="text/javascript"> (function($){ var hash=window.location.hash(#subpage), href=window.location.href.replace(/#.*$/,""); $(document).ready(function(){ //prevent browser jump to hash/id if(hash){ $(window).scrollTop(0).scrollLeft(0); if(window.history && window.history.pushState){ window.history.pushState("","",href); }else{ window.location.href=href; } } }); $(window).load(function(){ //call plugin to your element (e.g. .content) $(".content").mCustomScrollbar(); //scroll to location hash if(hash){ var target=$(hash).parents(".mCustomScrollbar"); if(target.length){ target.mCustomScrollbar("scrollTo",hash); } } }); })(jQuery); </script>

    Sorry, but I dont understand…
    Can you please help?


  12. Vlad
    Posted on November 7, 2018 at 22:12 Permalink

    How hide address bar in android browsers when scrolling like scroll by default?

  13. ayr
    Posted on October 31, 2018 at 20:20 Permalink

    How can I dynamically change the axis? I tried an if statement and recalled the plugin within the if statement but it didn’t work.

  14. Lee Kwang Dell
    Posted on October 27, 2018 at 07:42 Permalink

    how i can get the position of div# in myCustomscroll

  15. Owaiz Yusufi
    Posted on October 25, 2018 at 07:25 Permalink

    Does it works with jquery 3.3.1?

  16. Renat
    Posted on October 23, 2018 at 16:57 Permalink


    I have created container with popup inside it that can be snown (block) /hidden (none).
    Container is “.mCustomScrollBar”
    Popup has position: absolute. Popup height is greater than container height.
    When popup get’s visble then it is truncated by container.
    I tried “advanced : { updateOnContentResize : true}” but no luck.


    • Andre
      Posted on November 11, 2018 at 02:46 Permalink

      I have the same problem.

  17. John
    Posted on October 12, 2018 at 22:49 Permalink

    Hello Malihu,

    Excellent plugin you created, Thanks.

    Just would like to know how to stop it from calculating the margin top off screen with the minus sign, even though
    in my configuration setTop is set to zero (0).

    <div id="mCSB_1_container" class="mCSB_container" style=" position: relative; top: -960px; left: 0px;" dir="ltr"> <div id="mCSB_1_container" class="mCSB_container" style="position: relative; top: -853px; left: 0px;" dir="ltr"></div>

  18. Truth to be told
    Posted on October 10, 2018 at 07:16 Permalink

    This project seems to be dead and contains many problems. Last time GitHub repository have been updated over 2 years ago. Add to that 358 open issues for simple scroll is way too much.

    I recommend to look for better alternatives and there are plenty of them. Malihu-custom-scrollbar was hard to use, heavy and buggy.


    • Matt
      Posted on December 19, 2018 at 00:25 Permalink

      This plugin still works, and quite well actually. You probably don’t know what you’re doing is all.

      • Marianne
        Posted on April 25, 2019 at 18:34 Permalink

        The plugin works very well on all browsers, has very good documentation, themes … unlike other similar functionality plugins that are a somewhat struggle.

  19. Davidth
    Posted on October 9, 2018 at 14:15 Permalink

    it doesn’t work for me

  20. Nik
    Posted on October 9, 2018 at 03:11 Permalink

    Hello. It seems to me that search functionality doesn’t work. I press Ctrl+F in any browser and try to find a word – nothing happens. The plugin doesn’t scroll to the position of the found text. How can I fix this issue? Thanks

  21. Sunil
    Posted on September 2, 2018 at 14:51 Permalink

    Hello ,

    how to set default position bottom in below line


    { axis: ‘y’,theme: ’rounded-dark’}

  22. Yvan COYAUD
    Posted on August 10, 2018 at 10:40 Permalink

    Hello everybody
    When I include the malihu library (version 3.0.6) I have the following error:

    Uncaught ReferenceError: module is not defined at jquery.mousewheel.min.js: 8

    If I remove this library the error disappears …
    Does anyone have an idea to correct this error?
    thank you for your answers

  23. Chen zhaoyang
    Posted on July 24, 2018 at 11:46 Permalink

    How does calling Ajax determine whether scrolling is up or down?

  24. Squall
    Posted on July 19, 2018 at 18:13 Permalink

    Can I make, for example, 2 horizontal scroll bars?

  25. Debashis
    Posted on July 14, 2018 at 11:15 Permalink

    I am trying to use it with ReactJS and Meteor and getting this error in the console.

    Uncaught ReferenceError: module is not defined
    at jquery.mCustomScrollbar.concat.min.js:2

  26. Pratheesh
    Posted on July 13, 2018 at 19:49 Permalink


    Is there a way I can sync scrolls of a div with another scroll in another.
    That is when I scroll the first one second one also scrolls


  27. Parth
    Posted on July 5, 2018 at 15:38 Permalink

    I have initially set the the height of my panel. Now on window resize, how do I update the size of my panel i.e. from 600 to 100?

    Here’s the config object:
    $scope.scrollbarConfig = {
    autoHideScrollbar: true,
    horizRailEnabled: false,
    theme: ‘light’,
    advanced: {
    updateOnContentResize: true
    setHeight: 600,
    scrollInertia: 0

  28. Viet Nam
    Posted on June 28, 2018 at 09:50 Permalink

    Issues conflict with scroll to zoom in/out “jQuery Cropper” inside “mCustomScrollbar”
    on desktop unable zoom out
    on mobile scroll is corrupt.


Comments pages: 1 80 81 82

Post a comment

Your e-mail is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
You can write or copy/paste code directly in your comment using the <code> tag:
<code>code here...</code>
You may also use the data-lang attribute to determine the code language like so:
<code data-lang-html>, <code data-lang-css>, <code data-lang-js> and <code data-lang-php>