Reputation: 9
(function($){
$(window).load(function(){
$("#content_1").mCustomScrollbar({
scrollButtons: {
enable: true
},
theme: "dark",
horizontalScroll: true,
advanced: { updateOnContentResize: true, updateOnBrowserResize: true }
});
});
})(jQuery);
I'm using the above code to show both horizontal and vertical scrollbars in same content, however, only the horizontal scrollbar appears. How can I force both scrollbars to be shown?
Upvotes: 1
Views: 11953
Reputation: 51
$("#content_1").mCustomScrollbar({
axis:"yx",
setHeight: 'auto',
setWidth: "auto",
theme:"dark"
});
You can find some of this on their page http://manos.malihu.gr/jquery-custom-content-scroller/
I believe the setHeight: "auto" and setWidth"auto" are what mainly help this work.
Upvotes: 5
Reputation: 23
Ok, this also became my problem. It seems that mcustomscrollbar currently doesn't support this functionality. You can nest it but you cant have vertical and horizontal scrollbar at the same instance of mcustomscrollbar. Might as well use another scrollbar plugin. You can refer to this thread.
Upvotes: 0