Fade in fade out rotation

From , 3 Years ago, written in JavaScript, viewed 212 times.
URL https://pastebin.vip/view/e8d66338
  1. //传入图片集合
  2.                 function lunBO(input1,timeStep){
  3.                         input1.css('position','absolute');
  4.                         //获取数组长度,第一张显示,其他全部隐藏
  5.                         var length = input1.length;
  6.                         input1.hide();
  7.                         input1.eq(-1).show();
  8.                         var index = -1;
  9.                         //设置定时器
  10.                         setInterval(function(){
  11.                                 input1.eq(index).fadeOut(1000);
  12.                                 index--;
  13.                                 if(index < -length){
  14.                                         index = -1;
  15.                                 }
  16.                                 input1.eq(index).fadeIn(1000);
  17.                         },timeStep*1000);
  18.                 }              
  19.                 lunBO($('#lunBo img'),2);//传入图片的集合和轮播切换的时间(s)

Reply to "Fade in fade out rotation"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website