Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
c5bca5ca8a25be1b8f0dbda6e50fe4b8d8c12ab6
1 parent
b03154cb
筛选主菜单背景色
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
static/js/plugin/filter.js
static/sass/_filter.scss
static/js/plugin/filter.js
View file @
c5bca5c
...
...
@@ -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'
);
...
...
static/sass/_filter.scss
View file @
c5bca5c
...
...
@@ -41,6 +41,10 @@
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
color
:
#333
;
&
.highlight
{
background
:
#eee
;
}
}
.default
{
...
...
@@ -51,6 +55,7 @@
float
:
left
;
color
:
#000
;
}
}
}
...
...
Please
register
or
login
to post a comment