...
|
...
|
@@ -24,6 +24,18 @@ function showFilter() { |
|
|
$filter.removeClass('hide');
|
|
|
}
|
|
|
|
|
|
// 一级菜单点击时背景高亮
|
|
|
function highlightMainItem() {
|
|
|
var $mainItem = $('.filter-body .classify');
|
|
|
|
|
|
$mainItem.on('touchstart', '.shower', function() {
|
|
|
$mainItem.removeClass('highlight');
|
|
|
$(this).addClass('highlight');
|
|
|
}).on('touchend touchcancel', '.shower', function() {
|
|
|
$(this).removeClass('highlight');
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 子菜单点击时背景高亮
|
|
|
function highlightSubItem() {
|
|
|
var $subItem = $('.filter-body .sub-item');
|
...
|
...
|
@@ -107,6 +119,8 @@ function initFilter(opt) { |
|
|
hCbFn = opt.hCbFn;
|
|
|
|
|
|
missStatus = opt.missStatus;
|
|
|
|
|
|
highlightMainItem();
|
|
|
highlightSubItem();
|
|
|
|
|
|
$filter = $('.filter-mask');
|
...
|
...
|
|