...
|
...
|
@@ -16,7 +16,9 @@ var searchH = $('.newbrand-search').outerHeight(), |
|
|
headerH = $('.yoho-header').outerHeight(),
|
|
|
brandSwipe = parseInt(searchH) + parseInt(headerH) - 1;
|
|
|
|
|
|
var myHammer;
|
|
|
var myHammer, searchBtnHammer, clearTextHammer;
|
|
|
|
|
|
var $rightBarCon = $('#right-bar .con').find('b').unbind();
|
|
|
|
|
|
swiper = new Swiper('.swiper-container', {
|
|
|
lazyLoading: true,
|
...
|
...
|
@@ -52,14 +54,15 @@ if ($brandList.length > 0) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
if ($('#right-bar .con').find('b').unbind()[0]) {
|
|
|
myHammer = new Hammer($('#right-bar .con').find('b').unbind()[0]);
|
|
|
if ($rightBarCon[0]) {
|
|
|
myHammer = new Hammer($rightBarCon[0]);
|
|
|
myHammer.on('tap', function(e) {
|
|
|
var index = $(this).index();
|
|
|
var index = $rightBarCon.index();
|
|
|
|
|
|
if ($('.bar-' + index).size() > 0) {
|
|
|
document.body.scrollTop = parseInt($('.bar-' + index)[0].offsetTop) - parseInt(brandSwipe - 1);
|
|
|
}
|
|
|
e.srcEvent.stopPropagation();
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
@@ -87,19 +90,31 @@ $('#keyword').on('keyup', function() { |
|
|
$('.search-action').hide();
|
|
|
});
|
|
|
|
|
|
$('#search-btn').on('tap', function() {
|
|
|
// $('#search-btn').on('tap', function() {
|
|
|
// searchResult(1);
|
|
|
// });
|
|
|
|
|
|
searchBtnHammer = new Hammer($('#search-btn')[0]);
|
|
|
searchBtnHammer.on('tap', function(e) {
|
|
|
searchResult(1);
|
|
|
e.srcEvent.stopPropagation();
|
|
|
});
|
|
|
|
|
|
$('.clear-text').on('tap', function() {
|
|
|
// $('.clear-text').on('tap', function() {
|
|
|
// $('#keyword').val('').trigger('input');
|
|
|
// });
|
|
|
|
|
|
clearTextHammer = new Hammer($('.clear-text')[0]);
|
|
|
clearTextHammer.on('tap', function(e) {
|
|
|
$('#keyword').val('').trigger('input');
|
|
|
e.srcEvent.stopPropagation();
|
|
|
});
|
|
|
|
|
|
$('form.search-box').on('submit', function() {
|
|
|
return false;
|
|
|
});
|
|
|
|
|
|
$('.clear-history').on('tap', function() {
|
|
|
$('.clear-history').on('touchstart', function() {
|
|
|
|
|
|
// setcookie('h_brands', '', {
|
|
|
// expire: -1,
|
...
|
...
|
|