Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I'm using jQuery custom content scroller plugin and would like the scroll initiated automatically when the page loads.
我不确定我是否理解,但你可以使用类似的东西:
$(document).ready(function() { // or $(window).load(function() { $(selector).mCustomScrollbar(); // And if you meant to change the scroll position: $(selector).mCustomScrollbar("scrollTo",Integer); })
也许你可以用这个,不只是这个:
$(document).ready(function(){ $('html, body').scrollTop(25); });
?