...
|
...
|
@@ -28,7 +28,7 @@ lazyLoad($('img.lazy')); |
|
|
//$('img:in-viewport').trigger('appear');
|
|
|
|
|
|
//点击首页汉堡menu图标,滑出侧栏导航
|
|
|
$('.nav-btn').on('click', function (event) {
|
|
|
$('.nav-btn').on('tap', function (event) {
|
|
|
if (!$(this).hasClass('menu-open')) {
|
|
|
$('.mobile-wrap').addClass('menu-open');
|
|
|
$('.overlay').addClass('show');
|
...
|
...
|
@@ -45,7 +45,7 @@ $('.nav-btn').on('click', function (event) { |
|
|
});
|
|
|
|
|
|
//点击页面主体,收起侧栏导航及二级导航
|
|
|
$('.mobile-wrap').on('click', function () {
|
|
|
$('.mobile-wrap').on('tap', function () {
|
|
|
if ($(this).hasClass('menu-open')) {
|
|
|
$('.mobile-wrap').removeClass('menu-open');
|
|
|
$('.overlay').removeClass('show');
|
...
|
...
|
@@ -59,7 +59,7 @@ $('.mobile-wrap').on('click', function () { |
|
|
});
|
|
|
|
|
|
//点击一级导航,弹出二级导航
|
|
|
$('.side-nav').on('click', 'li', function () {
|
|
|
$('.side-nav').on('tap', 'li', function () {
|
|
|
if ($(this).find('.sub-nav').size() > 0) {
|
|
|
$('.sub-nav').removeClass('show');
|
|
|
$(this).find('.sub-nav').addClass('show');
|
...
|
...
|
@@ -68,7 +68,7 @@ $('.side-nav').on('click', 'li', function () { |
|
|
|
|
|
//返回一级导航,收起二级导航
|
|
|
$('.sub-nav').each(function () {
|
|
|
$(this).find('li').eq(0).on('click', function (e) {
|
|
|
$(this).find('li').eq(0).on('tap', function (e) {
|
|
|
$('.sub-nav').removeClass('show');
|
|
|
e.stopPropagation();
|
|
|
});
|
...
|
...
|
@@ -84,6 +84,7 @@ $('.sub-nav').on('mouseenter', 'li', function () { |
|
|
//头部banner轮播
|
|
|
if ($('.banner-swiper').find('li').size() > 1) {
|
|
|
bannerSwiper = new Swiper('.banner-swiper', {
|
|
|
lazyLoading: true,
|
|
|
loop: true,
|
|
|
autoplay: 3000,
|
|
|
autoplayDisableOnInteraction: false,
|
...
|
...
|
@@ -137,15 +138,8 @@ $('.category-swiper').each(function (i, index) { |
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
//回到顶部
|
|
|
// $('.back-to-top').bind('touchstart', function (e) {
|
|
|
// e.preventDefault();
|
|
|
// $(window).scrollTop(0);
|
|
|
// });
|
|
|
|
|
|
//关闭头部下载浮层
|
|
|
$('.header-download').on('click', '.close-btn', function () {
|
|
|
$('.header-download').on('tap', '.close-btn', function () {
|
|
|
$(this).parent().remove();
|
|
|
});
|
|
|
|
...
|
...
|
|