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 77 78 79

  1. Andreco Castillo
    Posted on March 10, 2017 at 18:26 Permalink

    It works for me whit content ajax.

    $vista = responseHTML;
    $(“#col_tareas”).mCustomScrollbar({theme: “minimal-dark”});


  2. Abbas Tahir
    Posted on March 10, 2017 at 15:55 Permalink


    I want to scale(1.value(1++)) an image using css on horizontal scroll.
    Please help.

    Abbas Tahir

  3. Vijith V Balakrishnan
    Posted on March 10, 2017 at 11:17 Permalink

    Very cool…:)

  4. ChuQ
    Posted on March 9, 2017 at 10:41 Permalink

    Hi. First, I would like to say thank you for your great plugin. As I am quite new to jQuery and javascript stuff…I would like to ask if I have created a dropdown list with 200 options with mCustomScrollBar… but currently I can only scroll a very little part of it instead of the full list… Can I hard code it so the scrollbar will follow my scroll to the top/bottom? Thank you so much again. Best regards!

  5. Biswajit Paul
    Posted on March 3, 2017 at 12:25 Permalink

    How to stop initializing mCustomScrollbar for a content have class mCustomScrollbar.

  6. Parkash Kumar
    Posted on March 2, 2017 at 14:44 Permalink

    Is there any option to show horizontal scrollbar scrolled to specific element on initialization?

  7. Amit
    Posted on March 1, 2017 at 19:42 Permalink

    I try to add or remove class on page scroll but it’s not working with the custom scroll bar plugging without the plug in its working fine

    Please help in this

    If possible please provide a Pencode example

  8. sunsunsun
    Posted on February 14, 2017 at 12:24 Permalink

    Hey there – great plugin. Is it possible to move (= “scroll”) the inner container via “translate” instead of “left/top”? I think this would greatly improve the performance on very large elements to scroll..

    • Math
      Posted on March 18, 2017 at 01:23 Permalink

      Hey did you find a way to move the content using translate instead of “left/top” with custom scrollbar ?

  9. joban91
    Posted on February 13, 2017 at 19:28 Permalink

    Is there any way to prevent the onScroll event from triggering until someone has let up off the dragger bar?

  10. Aman Chandra
    Posted on February 10, 2017 at 14:43 Permalink

    The plugin is not compatible with jquery 2.1.4.

  11. Ankush
    Posted on February 2, 2017 at 12:57 Permalink

    I observe flickering effect on IE browser. I’m using accordion within a max-height div with mCustomScrollBar. Wherever i open any accordion, scrollbar visible for 1 sec and invisible after that yet scrollbar is not required for this particular scenario. Please help. Thanks in advance.

  12. Filipi
    Posted on January 25, 2017 at 02:19 Permalink

    Is it possible colobox with nested?

  13. paulo
    Posted on January 24, 2017 at 18:13 Permalink

    Hey, there is a way to disable the scrollbar if im in a mobile? thanks

  14. sanjay
    Posted on January 24, 2017 at 07:37 Permalink

    We are using malihu custom scrollbar and facing an issue.
    I want to use infinite scrolling for my appliction. I don’t know how to use that callbacks. please help me out.

  15. Carlos
    Posted on January 22, 2017 at 21:50 Permalink

    Hi, is there a way to trigger the click and the double click event of an element in mobile (android, iOS)?, it works like a charm in desktop.

    Am i missing something?

    $(".class").mCustomScrollbar({ axis:"y", theme:"dark-3", scrollButtons:{ enable: true }, live:"on", advanced:{ updateOnContentResize: true, updateOnSelectorChange:true }, documentTouchScroll: false });


  16. Sofia
    Posted on January 16, 2017 at 15:08 Permalink

    Hi! Inside my scroll there is ul. How shoud I put the element (by clicking it) in the center of scroll?

    • Parkash Kumar
      Posted on March 2, 2017 at 14:46 Permalink

      This is exactly, what I need! In other words, it is said to be center locked horizontal scroll.

  17. Andrew
    Posted on January 16, 2017 at 15:02 Permalink

    Hi! Can I center scroll element, on click them?

  18. James
    Posted on January 10, 2017 at 20:56 Permalink

    Hi there – is it possible to offset the top position of the scrollbar within the function rather than modifying the CSS file?

  19. MJB
    Posted on December 18, 2016 at 05:28 Permalink

    Is it possible to dynamically update the snapAmount/scrollAmount value based on an elements updated width/height if the browser is resized.


    var amount = Math.max.apply(Math,$(“#content-1 li”).map(function(){return $(this).outerHeight(true);}).get());

    How do you pass the updated value to the scrollbar on resize?

  20. Diwakar Singh
    Posted on December 14, 2016 at 12:12 Permalink


    I am trying to implement this scrollbar on a textarea. Does this plugin work on a textarea component.

    Diwakar Singh

  21. Guy
    Posted on December 8, 2016 at 18:08 Permalink

    Question; I’ve the scroll bar on a window which has multiple custom select options and I want to deactivate just the mouse wheel when I hover.

    Now it’s plain to get to the exact event but I am not sure about the syntax required to do just that.
    $(‘.widgetSettingContent’).mCustomScrollbar(mouseWheel:{ enable: ‘false’ });?

    I’m pretty sure I’m mistaken, I’d be happy if anyone was kind enough to correct me.

  22. Nicolas
    Posted on December 3, 2016 at 21:16 Permalink

    How would you approach this issue:
    I have a list of cards whose height is not fixed. Because they contain flex elements, when their width is reduced, their height also decreases.
    When using your scrollbar against this list, this produces a weird flickering issue when dynamically resizing the height list. At first the scrollbar is not visible. Then, at some point, the scrollbar needs to be displayed. When it appears, the width of the list decreases by the width of the scrollbar. This makes all the cards also reduce their height, which, you guess, makes the scrollbar non needed. So it disappears. So the cards expand, and so on, and so on, until I reduce the height of the list enough so that the scrollbar is always needed.
    How would you fix that? Thanks.

  23. Josh
    Posted on December 2, 2016 at 13:18 Permalink

    The scroll to works great, but it’s often annoying to “scroll into view” when the element is already in view. It would be great to be able to check whether an element within the mCustomScrollbar is visible before calling scrollTo. This could be done either with a .visible method like this (which method might have other useful use cases) or more specifically, passing an option to scrollTo like “onlyIfNotVisible”: true

  24. Josh
    Posted on November 28, 2016 at 20:56 Permalink

    When I hide the scrollbar using CSS display: none; on a parent element and then remove that CSS, the scroll bar forgets the position it was scrolled to and resets itself back to the top. Is there anyway to maintain the scroll position between hide/shows?

  25. Kumar Gaurav
    Posted on November 28, 2016 at 10:13 Permalink

    We are using malihu custom scrollbar and facing an issue.
    If we click on the Dragger Rail of the custom scrollbar,then the container goes to top:position -2000 or something like that.And the content is invisible. However it works fine on dragging the srcollbar. On clicking the dragger rail, the behaviour is somewhat weird as at times the content disappears due to wrong calculation of the top position.Can you please suggest a solution? The content and the container is created dynamically everytime so we are destroying and re-creating custom scrollbar and passing the height of container everytime.

    Steps to Reproduce:
    We are using malihu custom scrollbar on interactive map. Just click on the map icon on top left corner and a google map will open .If you select one of the office locations i.e map pins, a right hand side panel will open.
    In the right hand panel,if we click in the right hand area
    (around the scroll bar, but not on the scroll bar i.e dragger rail),it makes the office text/details disappear. It reappears if you scroll up/down. Just try clicking randomly around this area.


Comments pages: 1 77 78 79

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>