An open API service indexing awesome lists of open source software.

https://github.com/superraytin/roller

jQuery scroll Timing Solutions - jQuery定时滚动解决方案
https://github.com/superraytin/roller

Last synced: 2 months ago
JSON representation

jQuery scroll Timing Solutions - jQuery定时滚动解决方案

Awesome Lists containing this project

README

        

roller
======

> jQuery定时滚动解决方案,丰富的参数设置,可根据实际需求精细化定制。

# 参数 & Params



参 数
描 述




list
必填项。列表选择器


timer
计时器,默认5s


speed
滚动速度,默认400ms


showNum
显示个数(可见区域内),默认4


rollNum
单次滚动个数,默认1


columnWidth
列宽度(水平滚动方向时)


rowHeight
行高度(竖直滚动方向时)


auto
是否自动滚动,默认自动


direction
默认滚动方向,默认向左(left,right,up,down)


cycle
是否循环,默认循环


cycleMode
循环滚动模式[normal,back],默认无缝连续滚动


trigger
按键触发方式,默认单击触发


hover
是否鼠标悬停时停止滚动,默认是


buttonA
左[上]按键


buttonB
右[下]按键


disableClass
按键控制class(到达临界状态)


buttonAutoHide
长度不够时,是否自动隐藏按键,默认否


focus
焦点模式(显示个数及滚动个数都为1时可用,即showNum:1,rollNum:1),默认关闭


focusOn
焦点模式当前class,默认'current'


focusTrigger
焦点触发方式,默认鼠标经过触发


callBack
回调函数(滚动执行完时调用,第一个参数为滚动过的次数,第二个参数为当前滚动方向),默认无

# 栗子 & Example
HTML:



  • 1111

  • 2222

  • 3333

  • 4444

  • 5555

  • 6666

  • 7777

  • 8888

  • 9999


Javascript:

```javascript

$('#roller').roller({
list: '.roller li',
timer: 5000,
speed: 400,
showNum: 4,
rollNum: 1,
columnWidth: 157,
rowHeight: 152
});

```

# 更新日志 & ChangeLog

# License
本项目基于MIT协议发布

MIT: [http://rem.mit-license.org](http://rem.mit-license.org/) 详见 [LICENSE](/LICENSE) 文件