Authored by uedxwg

hotfix

... ... @@ -32,9 +32,15 @@ var navHammer;
$('#search-input').focus(function() {
$(this).blur();
});
$nav.bind("contextmenu", function(e) {
return false;
});
$('.category-container').bind("contextmenu", function(e) {
return false;
});
navHammer = new Hammer($nav[0]);
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('li'),
index = $this.index();
... ... @@ -71,7 +77,7 @@ $categoryContainer.on('touchend', function(e) {
}
});
$categoryContainer.find('.primary-level').on('touchstart', 'li', function() {
$categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() {
$primaryItem.removeClass('highlight');
$(this).addClass('highlight');
}).on('touchend touchcancel', 'li', function() {
... ... @@ -84,3 +90,11 @@ $categoryContainer.find('.sub-level').on('touchstart', 'li', function() {
}).on('touchend touchcancel', 'li', function() {
$(this).removeClass('highlight');
});
$nav.on('touchstart', function(e) {
var target = e.target || e.srcElement;
target.parentNode.className = 'bytouch ' + target.parentNode.className;
}).on('touchend touchcancel', function() {
$nav.find('li').removeClass('bytouch');
});
\ No newline at end of file
... ...
... ... @@ -56,9 +56,12 @@ info.initInfosEvt($infoList);
};
});
}());
$nav.bind("contextmenu", function(e) {
return false;
});
navHammer = new Hammer($nav[0]);
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('.guang-nav-item'),
$content,
index;
... ... @@ -113,3 +116,11 @@ $(document).scroll(function() {
loadMore($c, state[curType]);
}
});
$nav.on('touchstart', function(e) {
var target = e.target || e.srcElement;
target.className = 'bytouch ' + target.className;
}).on('touchend touchcancel', function() {
$nav.find('li').removeClass('bytouch');
});
\ No newline at end of file
... ...
... ... @@ -20,9 +20,11 @@ mySwiper = new Swiper('.swiper-container', {
lazyLoading: true,
pagination: '.swiper-pagination'
});
$('#nav-tab').bind("contextmenu", function(e) {
return false;
});
navHammer = new Hammer(document.getElementById('nav-tab'));
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('li');
if ($this.hasClass('focus')) {
... ... @@ -38,7 +40,6 @@ $('#nav-tab').on('touchstart', function(e) {
var target = e.target || e.srcElement;
target.className = 'bytouch ' + target.className;
console.log(target);
}).on('touchend touchcancel', function() {
$navs.removeClass('bytouch');
});
\ No newline at end of file
... ...
... ... @@ -281,8 +281,12 @@ writeSearch.bindWirteLocal($('#search-form'));
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav.bind("contextmenu", function(e) {
return false;
});
navHammer = new Hammer($listNav[0]);
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('li'),
nav,
navType,
... ... @@ -444,3 +448,10 @@ if ($brandHeader.length > 0) {
//初始请求最新第一页数据
search();
$listNav.on('touchstart', function(e) {
var target = e.target || e.srcElement;
target.parentNode.parentNode.className = 'bytouch ' + target.parentNode.parentNode.className;
}).on('touchend touchcancel', function() {
$listNav.find('li').removeClass('bytouch');
});
... ...
... ... @@ -263,8 +263,11 @@ lazyLoad($('.lazy'));
//3.筛选无active时点击展开筛选面板
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
$listNav.bind("contextmenu", function(e) {
return false;
});
navHammer = new Hammer($listNav[0]);
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('li'),
nav,
navType,
... ...
... ... @@ -285,6 +285,10 @@ $.ajax({
});
lazyLoad($('.lazy'));
$listNav.bind("contextmenu", function(e) {
return false;
});
//导航栏点击逻辑说明:
//1.点击非active项时切换active状态
//2.价格和折扣active状态时继续点击切换排序
... ... @@ -292,7 +296,7 @@ lazyLoad($('.lazy'));
//4.筛选有active时点击隐藏筛选面板并恢复点击筛选前active项的active状态
//5.当前active为筛选并且点击其他项时,隐藏筛选面板
navHammer = new Hammer($listNav[0]);
navHammer.on('tap', function(e) {
navHammer.on('tap pressup', function(e) {
var $this = $(e.target).closest('li'),
nav,
navType,
... ...
... ... @@ -52,8 +52,14 @@
&.focus {
color: #000;
}
&.bytouch{
background:#eee;
}
}
span {
display: block;
width: 100%;
... ...
... ... @@ -59,6 +59,7 @@
height: 80rem / $pxConvertRem;
}
.guang-nav-item {
float: left;
color: #ccc;
... ... @@ -71,6 +72,10 @@
}
}
.bytouch{
background:#eee;
}
.info-list-container {
overflow-x: hidden;
background: #f0f0f0;
... ...
... ... @@ -193,6 +193,9 @@
text-align: center;
font-size: 14px;
}
.bytouch{
background:#eee;
}
a {
display: block;
... ...