*æ‚ rue, //监测Swiper 的祖/父元素
pagination: {
el: loopId + ' .indPro-pagination',
clickable: true,
type: 'progressbar',
},
navigation: {
nextEl: loopId + ' .indPro-btn .next',
prevEl: loopId + ' .indPro-btn .prev',
},
breakpoints: {
1599: {
spaceBetween: 24
},
1259: {
spaceBetween: 18
},
640: {
slidesPerView: 1,
spaceBetween: 10
},
},
})
})
var proBgSwiper = new Swiper('.indPro-bg .swiper-container', {
speed: 1000,
effect: 'fade',
fadeEffect: {
crossFade: true,
}
})
$('.indPro-menu .item').eq(0).addClass('active');
if (window.innerWidth > 1000) {
$('.indPro-menu .item').hover(function() {
$(this).addClass('active').siblings().removeClass('active');
$('.indPro-right-item').eq($(this).index()).show().siblings().hide();
proBgSwiper.slideTo($(this).index());
})
} else {
$('.indPro-menu .item').attr('href', 'javascript:void(0);')
$('.indPro-menu .item').click(function() {
$(this).addClass('active').siblings().removeClass('active');
$('.indPro-right-item').eq($(this).index()).show().siblings().hide();
proBgSwiper.slideTo($(this).index());
})
}
$('.banner .swiper-slide').eq(0).addClass('first');
var bannerSwiper = new Swiper('.banner .swiper-container', {
loop: true,
autoplay: {
delay: 3000,
disableOnInteraction: false
},
speed: 1000,
pagination: {
el: '.banner-pagination',
clickable: true,
},
on: {
slideChangeTransitionStart: function() {
if (this.activeIndex > 1) {
$('.banner .swiper-slide').removeClass('first')
}
},
},
});
});
if (window.innerWidth >= 1000) {
$(".indPro-menu,.indPro-right,.comTitle .title,.indAb-desc .title").addClass("wow fadeInUp").attr(
"data-wow-delay", '0.3s');
$(".comTitle .text,.indAb-desc .text,.indNews-show,.indAb-desc .comMore-box").addClass("wow fadeInUp").attr(
"data-wow-delay", '0.4s');
$(".indRD-swp").addClass("wow fadeInUp").attr("data-wow-delay", '0.5s');
var delayBan = 0.3;
$('.indNews-item').each(function() {
delayBan = delayBan * ($(this).index() + 1);
$(this).addClass('wow fadeInUp').attr({
'data-wow-delay': delayBan + 's',
'data-wow-duration': '1s'
});
delayBan = 0.3
})
} else {
$(".comTitle,.indPro-menu,.indPro-right,.indRD-swp-box,.indAb-desc,.indAb-num-list li,.indNews-show-item,.indNews-item")
.addClass("wow fadeIn").attr("data-wow-delay", '0.2s');
}
wow = new WOW({
boxClass: 'wow',
animateClass: 'animated',
offset: window.innerWidth >= 1000 ? 100 : 50,
mobile: true,
live: true
});
wow.init();