Jquery 平滑Div滚动-延迟后开始滚动
我正在使用jQuery插件Smooth Div Scroll,它工作得非常好,但我希望滚动不是立即开始,而是在延迟两秒钟后开始 下面是它的样子:Jquery 平滑Div滚动-延迟后开始滚动,jquery,delay,smooth-scrolling,Jquery,Delay,Smooth Scrolling,我正在使用jQuery插件Smooth Div Scroll,它工作得非常好,但我希望滚动不是立即开始,而是在延迟两秒钟后开始 下面是它的样子: <script type="text/javascript"> $(document).ready(function () { $("#makeMeScrollable").smoothDivScroll({ mousewheelScrolling: "allDirections", manualCo
<script type="text/javascript">
$(document).ready(function () {
$("#makeMeScrollable").smoothDivScroll({
mousewheelScrolling: "allDirections",
manualContinuousScrolling: true,
autoScrollingMode: "onStart"
});
});
</script>
$(文档).ready(函数(){
$(“#makeMeScrollable”).smoothDivScroll({
鼠标滚轮滚动:“所有方向”,
manualContinuousScrolling:正确,
自动克隆模式:“onStart”
});
});
下面介绍了所有选项:
有人能看一下吗?不幸的是,我被卡住了。有一个公共方法
startautoscrilling
,将其与setTimeout
相结合:
<script type="text/javascript">
$(document).ready(function () {
$("#makeMeScrollable").smoothDivScroll({
mousewheelScrolling: "allDirections",
manualContinuousScrolling: true
});
setTimeout(function() {
$("#makeMeScrollable").smoothDivScroll("startAutoScrolling");
}, 2000);
});
</script>
$(文档).ready(函数(){
$(“#makeMeScrollable”).smoothDivScroll({
鼠标滚轮滚动:“所有方向”,
manualContinuousScrolling:真
});
setTimeout(函数(){
$(“#makeMeScrollable”).smoothDivScroll(“startAutoScrolling”);
}, 2000);
});
工作得很好!谢谢,马蒂。