...
|
...
|
@@ -26,26 +26,38 @@ exports.init = function() { |
|
|
skip_invisible : false
|
|
|
});
|
|
|
|
|
|
//切换“最新”,“销量”,“价格”,“筛选”
|
|
|
$('#goods-nav').delegate('.nav-item', 'touchstart', function() {
|
|
|
var $cur = $(this);
|
|
|
|
|
|
if ($cur.hasClass('focus')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$navItem.removeClass('focus');
|
|
|
$cur.addClass('focus');
|
|
|
|
|
|
$goodList.addClass('hide');
|
|
|
if ($cur.hasClass('new-patterns-nav')) {
|
|
|
$npc.removeClass('hide');
|
|
|
} else if ($cur.hasClass('sales-volume-nav')) {
|
|
|
$svc.removeClass('hide');
|
|
|
} else if ($cur.hasClass('price-nav')) {
|
|
|
$pc.removeClass('hide');
|
|
|
/**
|
|
|
* 导航 touch/click处理句柄
|
|
|
*/
|
|
|
function touchEvt(e) {
|
|
|
var $cur = $(e.currentTarget);
|
|
|
if ($cur.hasClass('screen-nav')) {
|
|
|
//筛选
|
|
|
} else {
|
|
|
if ($cur.hasClass('focus')) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$navItem.removeClass('focus');
|
|
|
$cur.addClass('focus');
|
|
|
|
|
|
$goodList.addClass('hide');
|
|
|
if ($cur.hasClass('new-patterns-nav')) {
|
|
|
$npc.removeClass('hide');
|
|
|
} else if ($cur.hasClass('sales-volume-nav')) {
|
|
|
$svc.removeClass('hide');
|
|
|
} else if ($cur.hasClass('price-nav')) {
|
|
|
$pc.removeClass('hide');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//切换“最新”,“销量”,“价格”以及“筛选”功能
|
|
|
$('#goods-nav').delegate('.nav-item', 'touchstart', function(e) {
|
|
|
e.preventDefault();
|
|
|
touchEvt(e);
|
|
|
}).delegate('.nav-item', 'click', function(e) {
|
|
|
touchEvt(e);
|
|
|
});
|
|
|
});
|
|
|
}; |
|
|
\ No newline at end of file |
...
|
...
|
|