|
|
var $ = require('yoho-jquery'),
|
|
|
Swiper = require('yoho-swiper');
|
|
|
Swiper = require('yoho-swiper2');
|
|
|
|
|
|
var bannerSwiper,
|
|
|
categoryHeight = $('.tab-box').height(),
|
...
|
...
|
@@ -74,20 +74,39 @@ $('.brand-tab').find('li').click(function() { |
|
|
$('.category-content').removeClass('hide').siblings().addClass('hide');
|
|
|
$('.cate-cha').removeClass('hide').siblings().addClass('hide');
|
|
|
}
|
|
|
|
|
|
$('.banner-swiper').each(function() {
|
|
|
if ($(this).hasClass('swiper-container-horizontal') === false && $(this).find('li').length > 1) {
|
|
|
new Swiper(this, {
|
|
|
preloadImages: false,
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
lazyLoadingOnTransitionStart: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
paginationClickable: true,
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
if ($('.banner-swiper').find('li').size() > 1) {
|
|
|
bannerSwiper = new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
loop: true,
|
|
|
autoplay: 2000,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
paginationClickable: true,
|
|
|
slideElement: 'li',
|
|
|
pagination: '.banner-top .pagination-inner'
|
|
|
});
|
|
|
}
|
|
|
$('.banner-swiper').each(function() {
|
|
|
if ($(this).find('li').length > 1) {
|
|
|
new Swiper(this, {
|
|
|
preloadImages: false,
|
|
|
lazyLoading: true,
|
|
|
lazyLoadingInPrevNext: true,
|
|
|
lazyLoadingOnTransitionStart: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
autoplayDisableOnInteraction: false,
|
|
|
paginationClickable: true,
|
|
|
slideElement: 'li'
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}); |
...
|
...
|
|