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
24658a29ea93be33040a5ba3f06e326230edb3b7
1 parent
56f5b0cf
筛选子条目背景色
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
static/js/plugin/filter.js
static/sass/_filter.scss
static/js/plugin/filter.js
View file @
24658a2
...
...
@@ -24,6 +24,18 @@ function showFilter() {
$filter
.
removeClass
(
'hide'
);
}
// 子菜单点击时背景高亮
function
highlightSubItem
()
{
var
$subItem
=
$
(
'.filter-body .sub-item'
);
$subItem
.
on
(
'touchstart'
,
function
()
{
$subItem
.
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
}
//主筛选项Tap事件句柄
function
classifyTapEvt
(
$this
)
{
if
(
$this
.
hasClass
(
'active'
))
{
...
...
@@ -95,7 +107,7 @@ function initFilter(opt) {
hCbFn
=
opt
.
hCbFn
;
missStatus
=
opt
.
missStatus
;
highlightSubItem
();
$filter
=
$
(
'.filter-mask'
);
...
...
@@ -131,6 +143,7 @@ function initFilter(opt) {
}
}
});
}
//重置筛选面板
...
...
static/sass/_filter.scss
View file @
24658a2
...
...
@@ -59,7 +59,6 @@
display
:
none
;
width
:
50%
;
height
:
440px
;
padding-left
:
15px
;
left
:
50%
;
top
:
0
;
overflow
:
auto
;
...
...
@@ -67,10 +66,15 @@
>
li
{
height
:
60px
;
line-height
:
60px
;
padding-left
:
15px
;
border-bottom
:
1px
solid
#e6e6e6
;
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
&
.highlight
{
background
:
#eee
;
}
}
.chosed-icon
{
...
...
Please
register
or
login
to post a comment