|
@@ -24,6 +24,18 @@ function showFilter() { |
|
@@ -24,6 +24,18 @@ function showFilter() { |
24
|
$filter.removeClass('hide');
|
24
|
$filter.removeClass('hide');
|
25
|
}
|
25
|
}
|
26
|
|
26
|
|
|
|
27
|
+// 一级菜单点击时背景高亮
|
|
|
28
|
+function highlightMainItem() {
|
|
|
29
|
+ var $mainItem = $('.filter-body .classify');
|
|
|
30
|
+
|
|
|
31
|
+ $mainItem.on('touchstart', '.shower', function() {
|
|
|
32
|
+ $mainItem.removeClass('highlight');
|
|
|
33
|
+ $(this).addClass('highlight');
|
|
|
34
|
+ }).on('touchend touchcancel', '.shower', function() {
|
|
|
35
|
+ $(this).removeClass('highlight');
|
|
|
36
|
+ });
|
|
|
37
|
+}
|
|
|
38
|
+
|
27
|
// 子菜单点击时背景高亮
|
39
|
// 子菜单点击时背景高亮
|
28
|
function highlightSubItem() {
|
40
|
function highlightSubItem() {
|
29
|
var $subItem = $('.filter-body .sub-item');
|
41
|
var $subItem = $('.filter-body .sub-item');
|
|
@@ -107,6 +119,8 @@ function initFilter(opt) { |
|
@@ -107,6 +119,8 @@ function initFilter(opt) { |
107
|
hCbFn = opt.hCbFn;
|
119
|
hCbFn = opt.hCbFn;
|
108
|
|
120
|
|
109
|
missStatus = opt.missStatus;
|
121
|
missStatus = opt.missStatus;
|
|
|
122
|
+
|
|
|
123
|
+ highlightMainItem();
|
110
|
highlightSubItem();
|
124
|
highlightSubItem();
|
111
|
|
125
|
|
112
|
$filter = $('.filter-mask');
|
126
|
$filter = $('.filter-mask');
|