Skip to content

Commit bf1e8f9

Browse files
committed
修复右移不出现动画的bug
1 parent dc0f7b8 commit bf1e8f9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ var switchSwiper = function (options) {
115115
// 将初始时克隆的元素放到首位并出现
116116
this.lastEventClone.prependTo('.swiper-box');
117117
this.lastEventClone.css({'transition': 'all '+ this.autoPlaySpeed +'ms ease', 'transform': 'translateX(-200px)','opacity': 0, 'z-index': this.sonEventNum});
118-
this.lastEventClone.css({'transform': 'translateX(0px)','opacity': 1});
118+
var than = this;
119+
setTimeout(function(){
120+
than.lastEventClone.css({
121+
'transform': 'translateX(0px)',
122+
'opacity': 1});
123+
},100);
119124
}
120125

121126
// 手动切换

0 commit comments

Comments
 (0)