- 印象9721见好就收才是赢网站
- 才艺展示
- 员工风采
';
}
})
Html+='
';
Html+='
';
Html+='
';
$('.magic .magic-list').empty().append(Html);
/*
var mapping_swiper = new Swiper('.magic .swiper-container', {
watchSlidesProgress: true,
slidesPerView: 'auto',
centeredSlides: true,
observer:true,//修改swiper自己或子元素时,自动初始化swiper
observeParents:true,//修改swiper的父元素时,自动初始化swiper
loop: true,
loopedSlides: 3,
autoplay: {
delay: 5000,
stopOnLastSlide: false,
disableOnInteraction: false,
},
speed:1000,
navigation: {
nextEl: '.magic .swiper-button-next',
prevEl: '.magic .swiper-button-prev',
},
pagination: {
el: '.magic .swiper-pagination',
clickable: true,
},
on: {
progress: function(progress) {
for (i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i);
var slideProgress = this.slides[i].progress;
modify = 1;
if (Math.abs(slideProgress) > 1) {
modify = (Math.abs(slideProgress) - 1) * 0.3 + 1;
}
translate = slideProgress * modify * 260 + 'px';
scale = 1 - Math.abs(slideProgress) / 5;
zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
slide.transform('translateX(' + translate + ') scale(' + scale + ')');
slide.css('zIndex', zIndex);
slide.css('opacity', 1);
if (Math.abs(slideProgress) > 3) {
slide.css('opacity', 0);
}
}
},
setTransition: function(transition) {
for (var i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i)
slide.transition(transition);
}
}
}
});
mapping_swiper.update();
*/
var o_offs = 4.8,o_width = 2.4,o_opacity = 1;
if($(window).width()<700){
o_offs = 1,o_width = 1,o_opacity = 1;
}
var o_id=$('.magic'),o_offsetLeft;
o_offsetLeft = o_id.width()/o_offs;
o_id.find('.swiper-slide').css({
width:o_id.width()/o_width
})
$(window).resize(function(){
o_offsetLeft = o_id.width()/o_offs;
o_id.find('.swiper-slide').css({
width:o_id.width()/o_width
})
certifySwiper.update();
})
certifySwiper = new Swiper('.magic .swiper-container', {
watchSlidesProgress: true,
slidesPerView: 'auto',
observer:true,//修改swiper自己或子元素时,自动初始化swiper
observeParents:true,//修改swiper的父元素时,自动初始化swiper
centeredSlides: true,
loop: true,
speed:1000,
autoplay: {
delay: 5000,
stopOnLastSlide: false,
disableOnInteraction: false,
},
navigation: {
nextEl: '.magic .swiper-button-next',
prevEl: '.magic .swiper-button-prev',
},
pagination: {
el: '.magic .swiper-pagination',
clickable: true,
},
on: {
progress: function (progress) {
for (i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i);
var slideProgress = this.slides[i].progress;
modify = 1;
if (Math.abs(slideProgress) > 1) {
modify = (Math.abs(slideProgress) - 1) * 0.3 + 1;
}
translate = slideProgress * modify * o_offsetLeft + 'px';
scale = 1 - Math.abs(slideProgress) / 5;
zIndex = 999 - Math.abs(Math.round(10 * slideProgress));
slide.transform('translateX(' + translate + ') scale(' + scale + ')');
slide.css('zIndex', zIndex);
slide.css('opacity', 1);
if (Math.round(Math.abs(slideProgress)) > o_opacity) {
slide.css('opacity', 0);
}
}
},
setTransition: function (transition) {
for (var i = 0; i < this.slides.length; i++) {
var slide = this.slides.eq(i)
slide.transition(transition);
}
}
}
})
certifySwiper.update();
});
}
research( $('.magic ul li.active').data('id'));
$('.magic .con .magic-wrapper ul li').click(function () {
$(this).addClass('active').siblings().removeClass('active');
research( $(this).data('id'));
});
})
})