...
|
...
|
@@ -608,22 +608,25 @@ $searchForm.on('keyup', '.search-key', function(e) { |
|
|
$focus.addClass('action');
|
|
|
$(this).val($focus.find('.searchvalue').text());
|
|
|
} else if (e.which === 13) {
|
|
|
val = val.replace(new RegExp('\'', 'gm'), '');
|
|
|
if (val !== '') {
|
|
|
$(this).val(val);
|
|
|
$searchForm.submit();
|
|
|
}
|
|
|
} else {
|
|
|
if ($searchSug && $searchSug.length) {
|
|
|
val = val.replace(new RegExp('\'', 'gm'), ''); // 去掉特殊字符
|
|
|
|
|
|
$(this).val(val);
|
|
|
searchSuggest(val);
|
|
|
}
|
|
|
}
|
|
|
}).on('blur', '.search-key', function() {
|
|
|
setTimeout(function() {
|
|
|
$searchSug.hide();
|
|
|
}, 200);
|
|
|
});
|
|
|
|
|
|
$goCart.hover(function() {
|
|
|
if ($miniCart && $miniCart.length) {
|
|
|
$goCart.hover(function() {
|
|
|
var data, _html = '';
|
|
|
|
|
|
if ($goCart.hasClass('on-hover')) {
|
...
|
...
|
@@ -639,11 +642,11 @@ $goCart.hover(function() { |
|
|
}
|
|
|
$miniCart.html(_html);
|
|
|
$goCart.addClass('on-hover');
|
|
|
}, function() {
|
|
|
}, function() {
|
|
|
$goCart.removeClass('on-hover');
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$goCart.on('click', '.cart-goods-del', function() {
|
|
|
$goCart.on('click', '.cart-goods-del', function() {
|
|
|
var $dom = $(this),
|
|
|
data = $dom.data(),
|
|
|
callback;
|
...
|
...
|
@@ -655,7 +658,8 @@ $goCart.on('click', '.cart-goods-del', function() { |
|
|
data.key = $goCart.data().key;
|
|
|
delCartGoods(data, callback);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$subNav.on({
|
|
|
mouseenter: function() {
|
...
|
...
|
|