我有一个jQuery滚动器,它垂直向上和向下滚动。
滚动条包含的时间是从上午5:00到晚上10:00。我希望滚动条一次单击仅向上移动一次。onload滚动条功能如下:
jQuery.noConflict();
/* calling thumbnailScroller function with options as parameters */
(function($){
window.onload=function(){
$("#tS3").thumbnailScroller({
scrollerType:"clickButtons",
scrollerOrientation:"vertical",
scrollSpeed:1,
scrollEasing:"easeOutCirc",
scrollEasingAmount:800,
acceleration:1,
scrollSpeed:300,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500
});
}
})(jQuery);
我创建了一个jsfiddle来显示我的滚动条问题。现在,单击一次滚动条即可多次向上移动。我想将此滚动器功能更改为一次向上移动一次。
提前致谢。
我使用原始的插件演示源,稍微修改一下插件,添加一个step
选项,请参见Demo
(function($){
$("#tS3").thumbnailScroller({
scrollerType:"clickButtons",
scrollerOrientation:"vertical",
scrollSpeed:2,
scrollEasing:"easeOutCirc",
scrollEasingAmount:800,
acceleration:4,
scrollSpeed:800,
noScrollCenterSpace:10,
autoScrolling:0,
autoScrollingSpeed:2000,
autoScrollingEasing:"easeInOutQuad",
autoScrollingDelay:500,
step:1/6 // You can change this more and less, and see the different
});
})(jQuery);
PS您的演示是如此无序,所以我使用插件演示。这浪费了我几个小时
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句