let length = $('.swiper-nav li').length;
for (let i = 0; i < length; i++) {
let item = $('.swiper-nav li').eq(i);
(function (i) {
setTimeout(function () {
item.addClass('tracking-in-contract-bck')
}, 1000 * i);
})(i)
}
这样就是闭包,快乐~