adaptive-width-infinity-slider
Support touch event in mobile terminal.
自适应宽度无缝轮播jquery,zepto插件,支持移动端手指滑动。可以配置为固定宽度轮播。
(使用zepto时,需要按照zepto的要求修改插件的写法)以及插件文件
html代码在html页面中
JS代码
$(function(){ var $skSlider=$('#skSlider'); $skSlider.slider();//执行轮播 });
Dispose slider of fixed width which is controled by css;
$(function(){ var $skSlider=$('#skSlider'); $skSlider.slider({ screenwidth:false });//执行轮播 });
Dispose auto play and time interval
$(function(){ var $skSlider=$('#skSlider'); $skSlider.slider({ auto:true, //默认不自动播放 time:5000 //单位:ms =>默认10000ms });//执行轮播 });
注:长时间运行有点儿内存泄漏,希望各位大神指正! eg: There is some memory leak in it.I hope someone to modify it.