$(function () {
//banner
$('.banner .slick').slick({
autoplay: true,
dots: true,
arrows: false,
accessibility: true,
speed: 1500,
custompaging: function (slider, i) {
return '
' + 0 + (i + 1) + '
';
}
});
//焦点图
$('.jdt .slider').slick({
autoplay: false,
dots: false,
arrows: false,
accessibility: true,
speed: 1500
});
var slickfun = function (e) {
$('.jdt .slider').slick('slickpause');
if ($(this).find('.slick-current video').length > 0) {
var $slide = this;
$(this).find('video').each(function () {
this.pause();
});
$(this).find('.slick-current video')[0].play();
$(this).find('.slick-current video').on('ended', function () {
$($slide).slick('slicknext');
});
} else {
$(this).slick('slickplay');
}
}
$('.jdt .slider').on('afterchange', slickfun);
$('.jdt .slider').each(slickfun);
//产品中心
$('.s3-l>ul').slick({
// autoplay: true,
slidestoshow: 1,
slidestoscroll: 1,
dots: false,
arrows: true,
asnavfor: '.s3-rt>ul,.s3-rb>ul'
});
$('.s3-rt>ul').slick({
// autoplay: true,
slidestoshow: 1,
slidestoscroll: 1,
dots: false,
arrows: false,
asnavfor: '.s3-rb>ul,.s3-l>ul'
});
$('.s3-rb>ul').slick({
// autoplay: true,
slidestoshow: 3,
slidestoscroll: 1,
dots: false,
arrows: true,
asnavfor: '.s3-rt>ul,.s3-l>ul',
focusonselect: true,
responsive: [{
breakpoint: 769,
settings: {
slidestoshow: 2,
slidestoscroll: 1
}
}]
});
// 解决方案
$('.s4-c>ul').slick({
slidestoshow: 5,
slidestoscroll: 1,
dots: false,
arrows: false,
responsive: [{
breakpoint: 1025,
settings: {
slidestoshow: 4,
slidestoscroll: 1
}
}, {
breakpoint: 769,
settings: {
slidestoshow: 3,
slidestoscroll: 1
}
}, {
breakpoint: 481,
settings: {
slidestoshow: 2,
slidestoscroll: 1
}
}]
});
// 实力保障
$('.s5-c>ul').slick({
slidestoshow: 4,
slidestoscroll: 1,
dots: false,
arrows: false,
responsive: [{
breakpoint: 1025,
settings: {
slidestoshow: 4,
slidestoscroll: 1
}
}, {
breakpoint: 769,
settings: {
slidestoshow: 3,
slidestoscroll: 1
}
}, {
breakpoint: 481,
settings: {
slidestoshow: 2,
slidestoscroll: 1
}
}]
});
})