1
votes
(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?

2

2 Answers

5
votes
$("#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.

0
votes

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.