admin管理员组文章数量:1287591
How can I make my scrollbar start in the middle of my container using
I'm trying to cheat it by using
$(".trek_main_timeline_wrap").perfectScrollbar();
$(".trek_main_timeline_wrap .ps-scrollbar-y-rail").css({
"left" : "5px",
"top" : "200px"
});
But this is only pushing the scrollbar down, not the content inside of the container.
How can I make my scrollbar start in the middle of my container using https://github./noraesae/perfect-scrollbar
I'm trying to cheat it by using
$(".trek_main_timeline_wrap").perfectScrollbar();
$(".trek_main_timeline_wrap .ps-scrollbar-y-rail").css({
"left" : "5px",
"top" : "200px"
});
But this is only pushing the scrollbar down, not the content inside of the container.
Share Improve this question asked Nov 5, 2013 at 17:11 Jason BiondoJason Biondo 8345 gold badges18 silver badges37 bronze badges 2- can you share your HTML code? – Sid M Commented Nov 5, 2013 at 17:18
- Could you give us a jsfiddle? – Robin Commented Nov 5, 2013 at 19:38
1 Answer
Reset to default 11You would just use scrollTop
and update
:
$('.ps-container').scrollTop(100).perfectScrollbar('update');
本文标签: javascriptjQuery Perfect ScrollStart scroll bar in the Middle of the ContainerStack Overflow
版权声明:本文标题:javascript - jQuery Perfect Scroll - Start scroll bar in the Middle of the Container? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741272637a2369551.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论