...
|
...
|
@@ -32,6 +32,12 @@ var $udPrice = $('.ud-price-range'), |
|
|
//分类相关变量
|
|
|
var $sortSub = $('.sort-sub-wrap');
|
|
|
|
|
|
//高级选项相关变量
|
|
|
var $seniorSubWrap = $('.senior-sub-wrap'),
|
|
|
$seniorAttrWrap = $('.senior-attr-wrap');
|
|
|
|
|
|
var seniorHoverTime, hoveredIndex;
|
|
|
|
|
|
//清除checkbox选中状态
|
|
|
function clearChecked($checkbox) {
|
|
|
$checkbox.removeClass('checked').html(checkUnicode.unchecked);
|
...
|
...
|
@@ -241,15 +247,26 @@ if ($udPrice.length > 0) { |
|
|
}
|
|
|
|
|
|
//【高级选项】鼠标移入显示子项
|
|
|
$('.senior-attr-wrap').on('mouseenter', '.attr', function() {
|
|
|
$(this).children('.senior-sub').removeClass('hide');
|
|
|
$seniorAttrWrap.on('mouseenter', '.attr', function() {
|
|
|
var index = $(this).addClass('hover').index();
|
|
|
|
|
|
$seniorSubWrap.children('.senior-sub:eq(' + index + ')').removeClass('hide');
|
|
|
}).on('mouseleave', '.attr', function() {
|
|
|
$(this).children('.senior-sub').addClass('hide');
|
|
|
var $this = $(this),
|
|
|
index = $this.index();
|
|
|
|
|
|
hoveredIndex = index;
|
|
|
|
|
|
seniorHoverTime = setTimeout(function() {
|
|
|
$seniorSubWrap.children('.senior-sub:eq(' + index + ')').addClass('hide');
|
|
|
$this.removeClass('hover');
|
|
|
hoveredIndex = -1;
|
|
|
}, 100);
|
|
|
});
|
|
|
|
|
|
//【高级选项】多选
|
|
|
$('.senior-sub').on('click', '.multi-select', function() {
|
|
|
$(this).closest('.sub').addClass('multi');
|
|
|
$(this).closest('.senior-sub').addClass('multi');
|
|
|
}).on('click', '.multi-select-ok', function() {
|
|
|
var $btn = $(this),
|
|
|
$sub = $btn.closest('.senior-sub'),
|
...
|
...
|
@@ -266,4 +283,10 @@ $('.senior-sub').on('click', '.multi-select', function() { |
|
|
});
|
|
|
|
|
|
uriLoc($sub.data('attr'), val);
|
|
|
}).on('mouseenter', function() {
|
|
|
clearTimeout(seniorHoverTime);
|
|
|
}).on('mouseleave', function() {
|
|
|
$seniorSubWrap.children('.senior-sub:eq(' + hoveredIndex + ')').addClass('hide');
|
|
|
$seniorAttrWrap.children('.attr:eq(' + hoveredIndex + ')').removeClass('hover');
|
|
|
hoveredIndex = -1;
|
|
|
}); |
|
|
\ No newline at end of file |
...
|
...
|
|