Current position:Home > Body > Hiace
$(function () {
// var galleryThumbs = new Swiper('.gallery-thumbs', {
// spaceBetween: 10,
// centeredSlides: false,
// slidesPerView: 'auto',
// slidesOffsetBefore: 0,
// touchRatio: 0.2,
// slideToClickedSlide: true,
// loop: true,
// onTap: function (swiper) {
// var num = parseInt($('.gallery-thumbs .swiper-slide-active').attr("date-index"));
// $('.gallery-top .swiper-slide').removeClass('act');
// $('.gallery-top .swiper-slide').eq(num).addClass('act');
// $(".jqzoom").imagezoom();
// }
// });
// $('.gallery-top .swiper-button-next').click(function () {
// if ($(window).width() > 991) {
// galleryThumbs.slideNext();
// }
// })
// $('.gallery-top .swiper-button-prev').click(function () {
// if ($(window).width() > 991) {
// galleryThumbs.slidePrev();
// }
// })
// if ($(window).width() <= 991) {
// var galleryTop = new Swiper('.gallery-top', {
// nextButton: '.swiper-button-next',
// prevButton: '.swiper-button-prev',
// spaceBetween: 10,
// loop: true,
// });
// }
if ($(window).width() > 991) {
$(".jqzoom").imagezoom();
}
$('.proimg-l ul').bxSlider({
mode: 'fade',
infiniteLoop: false,
pagerCustom: '.bx-pager',
});
// 切换
var c_ul = $('.proimg-s');
c_li = c_ul.find('li');
c_i = 0;
c_left = $('.proimg-pager').find(".prev");
c_right = $('.proimg-pager').find(".next");
var c_length;
c_length = Math.ceil(c_li.length / 4);
//左边点击
c_left.click(cLeft);
//右边点击
c_right.click(cRight);
function cLeft() {
c_i--;
c_i = c_i < 0 ? c_length - 1 : c_i;
cScroll();
}
function cRight() {
c_i++;
c_i = c_i > c_length - 1 ? 0 : c_i;
cScroll();
}
function cScroll() {
c_ul.stop().animate({
left: -560 * c_i
}, 500);
}
})