首页 > IT职业 > IT图书 > jquery scrollable的使用
这个是简单的例子 http://flowplayer.org/tools/demos/scrollable/one-sized.html
参数配置URL:http://flowplayer.org/tools/scrollable/index.html ,有中文翻译(http://www.jb51.net/article/19903.htm)
完整的HTML代码如下:
// select #flowplanes and make it scrollable. use circular and navigator plugins
$("#flowpanes").scrollable({ circular: true, mousewheel: true }).navigator({
// select #flowtabs to be used as navigator
navi: "#flowtabs",
// select A tags inside the navigator to work as items (not direct children)
naviItem: 'a',
// assign "current" class name for the active A tag inside navigator
activeClass: 'current',
// make browser's back button work
history: true
});
});
<!-- tab panes -->
<!-- wrapper for scrollable items -->
<!-- the items -->
<!-- "Previous" action -->
<!-- "Next" action -->
分析:
$("div.scrollable").scrollable({
size: 3,
vertical:false,
//clickable:false,
loop:true,//设置是否自动跳转(根据间隔时间)
//interval: 1000,//设置间歇时间间隔
//speed:2000,
items: '#thumbs',
//prev:'.prev',//跳转到上一项
//next:'.next'//跳转到下一项
prevPage:'.prev',//跳转到上一页
nextPage:'.next',//跳转到下一页
hoverClass: 'hover',
easing:'linear'
});
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/887/viewspace-2813261/ ,如需转载,请注明出处,否则将追究法律责任。