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
56f5b0cfbda4657b224c69d06a76c9ce1cf7940e
1 parent
031c1319
商品分类 条目背景色
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
static/js/category/index.js
static/sass/category/_index.scss
static/js/category/index.js
View file @
56f5b0c
...
...
@@ -9,10 +9,10 @@ var $ = require('jquery'),
var
$nav
=
$
(
'.category-nav'
),
$categoryContainer
=
$
(
'.category-container'
),
$contents
=
$categoryContainer
.
children
(
'.content'
);
$contents
=
$categoryContainer
.
children
(
'.content'
),
$subLevelItem
=
$
(
'.sub-level li'
);
var
$curContent
=
$contents
.
not
(
'.hide'
),
$curClickSubLevel
;
var
$curContent
=
$contents
.
not
(
'.hide'
);
var
navHammer
,
ccHammer
;
...
...
@@ -71,13 +71,9 @@ ccHammer.on('tap', function(e) {
}
});
$
(
'.sub-level'
).
bind
(
'touchend'
,
function
(
e
)
{
var
$cur
=
$
(
e
.
target
);
$cur
.
addClass
(
'a-highlight'
);
if
(
$curClickSubLevel
)
{
$curClickSubLevel
.
removeClass
(
'a-highlight'
);
}
$curClickSubLevel
=
$cur
;
});
\ No newline at end of file
$subLevelItem
.
on
(
'touchstart'
,
function
()
{
$subLevelItem
.
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
...
...
static/sass/category/_index.scss
View file @
56f5b0c
...
...
@@ -95,7 +95,6 @@
.sub-level-container
{
float
:
left
;
box-sizing
:
border-box
;
padding-left
:
20rem
/
$pxConvertRem
;
background
:
#fff
;
width
:
60%
;
height
:
100%
;
...
...
@@ -112,6 +111,11 @@
height
:
71rem
/
$pxConvertRem
;
line-height
:
71rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#e6e6e6
;
padding-left
:
20rem
/
$pxConvertRem
;
&
.highlight
{
background
:
#eee
;
}
&
:last-child
{
border-bottom
:
none
;
...
...
@@ -126,7 +130,4 @@
}
}
.a-highlight
{
text-decoration
:
underline
;
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment