Paramètres JQ (function($){ $(window).load(function(){ $(".echanges").mCustomScrollbar({ theme:"light", snapAmount:40, scrollButtons:{enable:true}, keyboard:{scrollAmount:40}, mouseWheel:{deltaFactor:40}, scrollInertia:400 }); }); })(jQuery); /* set element/content width programmatically values: boolean, pixels, percentage */ setWidth:false, /* set element/content height programmatically values: boolean, pixels, percentage */ setHeight:false, /* set the initial css top property of content values: string (e.g. "-100px", "10%" etc.) */ setTop:0, /* set the initial css left property of content values: string (e.g. "-100px", "10%" etc.) */ setLeft:0, /* scrollbar axis (vertical and/or horizontal scrollbars) values (string): "y", "x", "yx" */ axis:"y", /* position of scrollbar relative to content values (string): "inside", "outside" ("outside" requires elements with position:relative) */ scrollbarPosition:"inside", /* scrolling inertia values: integer (milliseconds) */ scrollInertia:950, /* auto-adjust scrollbar dragger length values: boolean */ autoDraggerLength:true, /* auto-hide scrollbar when idle values: boolean */ autoHideScrollbar:false, /* auto-expands scrollbar on mouse-over and dragging */ autoExpandScrollbar:false, /* always show scrollbar, even when there's nothing to scroll values: integer (0=disable, 1=always show dragger rail, 2=always show dragger rail, dragger and buttons), boolean */ alwaysShowScrollbar:0, /* scrolling always snaps to a multiple of this number in pixels values: integer */ snapAmount:null, /* when snapping, snap with this number in pixels as an offset values: integer */ snapOffset:0, /* mouse-wheel scrolling */ mouseWheel:{ /* enable mouse-wheel scrolling values: boolean */ enable:true, /* scrolling amount in pixels values: "auto", integer */ scrollAmount:"auto", /* mouse-wheel scrolling axis the default scrolling direction when both vertical and horizontal scrollbars are present values (string): "y", "x" */ axis:"y", /* prevent the default behaviour which automatically scrolls the parent element(s) when end of scrolling is reached values: boolean */ preventDefault:false, /* the reported mouse-wheel delta value. The number of lines (translated to pixels) one wheel notch scrolls. values: "auto", integer "auto" uses the default OS/browser value */ deltaFactor:"auto", /* normalize mouse-wheel delta to -1 or 1 (disables mouse-wheel acceleration) values: boolean */ normalizeDelta:false, /* invert mouse-wheel scrolling direction values: boolean */ invert:false, /* the tags that disable mouse-wheel when cursor is over them */ disableOver:["select","option","keygen","datalist","textarea"] }, /* scrollbar buttons */ scrollButtons:{ /* enable scrollbar buttons values: boolean */ enable:false, /* scrollbar buttons scrolling type values (string): "stepless", "stepped" */ scrollType:"stepless", /* scrolling amount in pixels values: "auto", integer */ scrollAmount:"auto" }, /* keyboard scrolling */ keyboard:{ /* enable scrolling via keyboard values: boolean */ enable:true, /* keyboard scrolling type values (string): "stepless", "stepped" */ scrollType:"stepless", /* scrolling amount in pixels values: "auto", integer */ scrollAmount:"auto" }, /* enable content touch-swipe scrolling values: boolean, integer, string (number) integer values define the axis-specific minimum amount required for scrolling momentum */ contentTouchScroll:25, /* advanced option parameters */ advanced:{ /* auto-expand content horizontally (for "x" or "yx" axis) values: boolean */ autoExpandHorizontalScroll:false, /* auto-scroll to elements with focus */ autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']", /* auto-update scrollbars on content, element or viewport resize should be true for fluid layouts/elements, adding/removing content dynamically, hiding/showing elements, content with images etc. values: boolean */ updateOnContentResize:true, /* auto-update scrollbars each time each image inside the element is fully loaded values: boolean */ updateOnImageLoad:true, /* auto-update scrollbars based on the amount and size changes of specific selectors useful when you need to update the scrollbar(s) automatically, each time a type of element is added, removed or changes its size values: boolean, string (e.g. "ul li" will auto-update scrollbars each time list-items inside the element are changed) a value of true (boolean) will auto-update scrollbars each time any element is changed */ updateOnSelectorChange:false }, /* scrollbar theme values: string ready-to-use themes: "light", "dark", "light-2", "dark-2", "light-3", "dark-3", "light-thick", "dark-thick", "light-thin", "dark-thin", "rounded", "rounded-dark", "rounded-dots", "rounded-dots-dark", "3d", "3d-dark", "3d-thick", "3d-thick-dark", "minimal", "minimal-dark", "inset", "inset-dark", "inset-2", "inset-2-dark", "inset-3", "inset-3-dark" */ theme:"light", /* user defined callback functions */ callbacks:{ /* function to call when a scroll event starts values (function): function(){} */ onScrollStart:false, /* function to call when a scroll event is complete values (function): function(){} */ onScroll:false, /* function to call when a scroll event is complete and content is scrolled all the way to the end (bottom/right) values (function): function(){} */ onTotalScroll:false, /* function to call when a scroll event is complete and content is scrolled back to the beginning (top/left) values (function): function(){} */ onTotalScrollBack:false, /* function to call when a scroll event is running values (function): function(){} */ whileScrolling:false, /* onTotalScroll offset value values: integer (pixels) */ onTotalScrollOffset:0, /* onTotalScrollBack offset value values: integer (pixels) */ onTotalScrollBackOffset:0, /* callback offsets will trigger even if content is already scrolled to the end or beginning values: boolean */ alwaysTriggerOffsets:true, /* function to call when content becomes long enough and vertical scrollbar is added values (function): function(){} */ onOverflowY:false, /* function to call when content becomes wide enough and horizontal scrollbar is added values (function): function(){} */ onOverflowX:false, /* function to call when content becomes short enough and vertical scrollbar is removed values (function): function(){} */ onOverflowYNone:false, /* function to call when content becomes narrow enough and horizontal scrollbar is removed values (function): function(){} */ onOverflowXNone:false }, /* add scrollbar(s) on all elements matching the current selector, now and in the future values: boolean, string string values: "on" (enable), "once" (disable after first invocation), "off" (disable) */ live:false, /* the matching set of elements (instead of the current selector) to add scrollbar(s), now and in the future values: string (selector) */ liveSelector:null