...
|
...
|
@@ -56,10 +56,12 @@ var $listNav = $('#list-nav'), |
|
|
$pre, //纪录进入筛选前的active项
|
|
|
searching;
|
|
|
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
|
|
pagination: '.swiper-pagination'
|
|
|
});
|
|
|
if ($('.swiper-container .swiper-slide').length > 1) {
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
|
|
pagination: '.swiper-pagination'
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 筛选注册的回调,筛选子项点击后逻辑
|
...
|
...
|
@@ -214,7 +216,7 @@ filter.registerCbFn(search); |
|
|
//3.筛选无active时点击展开筛选面板
|
|
|
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
|
|
|
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
|
|
|
$listNav.delegate('li', 'tap', function() {
|
|
|
$listNav.delegate('li', 'touchstart', function() {
|
|
|
var $this = $(this),
|
|
|
nav,
|
|
|
navType,
|
...
|
...
|
@@ -308,8 +310,8 @@ $(window).scroll(function() { |
|
|
//当scroll到1/4$goodsContainer高度后继续请求下一页数据
|
|
|
if ($(window).scrollTop() + winH >
|
|
|
$(document).height() - 0.25 * $goodsContainer.height()) {
|
|
|
if ($pre != undefined) {
|
|
|
if ($pre !== undefined) {
|
|
|
search();
|
|
|
}
|
|
|
}
|
|
|
}); |
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|