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定时滚动解决方案
- Host: GitHub
- URL: https://github.com/superraytin/roller
- Owner: superRaytin
- License: mit
- Created: 2013-09-20T04:16:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-20T04:29:45.000Z (over 11 years ago)
- Last Synced: 2025-01-24T05:25:12.225Z (4 months ago)
- Size: 117 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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) 文件