Authored by wenjiekong

自动轮播

@@ -46,4 +46,12 @@ exports.init = function(selector) { @@ -46,4 +46,12 @@ exports.init = function(selector) {
46 slider.unslider('next'); 46 slider.unslider('next');
47 } 47 }
48 }); 48 });
  49 +
  50 + setInterval(function(){
  51 + if (slider.data('unslider').current >= cols) {
  52 + slider.unslider('animate:first');
  53 + } else {
  54 + slider.unslider('next');
  55 + }
  56 + },2000);
49 }; 57 };