0

我正在使用simpleScroll v2,我的主页上有 2 个滚动块,但它们以相同的速度滚动,我想更改此块的速度:

<script type="text/javascript">
     (function($) {
          $(function() {                    
              $("#scrollerv").simplyScroll({orientation:'vertical',customClass:'vert'});
          });
     })(jQuery);
</script>

我怎么能做到这一点?无需接触 JS 文件。谢谢你的帮助!

4

1 回答 1

1

从插件的文档中:

速度,默认值:1,每帧移动的像素数,在“循环”模式下必须能被滚动条的总宽度整除

所以你的代码需要是:

$("#scrollerv").simplyScroll({
    orientation: 'vertical',
    customClass: 'vert',
    speed: 2 // increase to make faster
});
于 2013-10-17T09:21:25.353 回答