【问题标题】:Make horizontal scrollbar start at right end使水平滚动条从右端开始
【发布时间】:2013-08-28 05:04:33
【问题描述】:

在mCustomScrollbar中,我想默认将滚动条放在水平位置的右端,所以我尝试了这个:

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

这不起作用。以下工作,但不会将滚动条移动到正确的位置:

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

我应该怎么做才能让水平滚动默认出现在右边?

【问题讨论】:

  • 你能给我看看你的滚动条的截图吗?

标签: javascript jquery scroll scrollbar mcustomscrollbar


【解决方案1】:

试试下面的

(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);

点击此链接下载http://www.4shared.com/document/KxCFmv7E/jquerymCustomScrollbarconcatmi.html

【讨论】:

  • 实际上它并不能解决我让滚动条显示正确的问题。有人可以帮忙吗
  • @karthipanraj 你试过使用方向:rtl;在 CSS 中
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-12-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-26
  • 2012-09-16
  • 2017-03-30
相关资源
最近更新 更多