Make horizontal scrollbar start at right end

1.1k views Asked by At

In mCustomScrollbar, I want to place the scroller at the right end of horizontal position by default, so I tried this:

$('.content').mCustomScrollbar("scrollTo",'last', {horizontalScroll: true});

Which did not work. The following works, but does not move the scrollbar to the right position:

$('.content').mCustomScrollbar({horizontalScroll: true});

What should I do to make the horizontal scroll appear at right by default?

1

There are 1 answers

2
Saranya Sadhasivam On

Try the below

(function($){
    $(window).load(function(){
        $(".content").mCustomScrollbar({advanced:{ // Advanced options
           autoScrollOnFocus: false,
           updateOnContentResize: true, // Scrollbar will be updated on content resize
           updateOnBrowserResize: true  // Scrollbar will be updated on browser resize
        }});
    });
})(jQuery);

Check this link to download http://www.4shared.com/document/KxCFmv7E/jquerymCustomScrollbarconcatmi.html