Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
2029d0b92166fa10e7ce04d0a206815446f4a568
1 parent
2e55c585
侧边连优化
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
static/js/home/home.js
static/sass/home/_side-nav.scss
static/js/home/home.js
View file @
2029d0b
...
...
@@ -10,6 +10,7 @@ var $ = require('jquery'),
$mobileWrap
=
$
(
'.mobile-wrap'
),
$overlay
=
$
(
'.overlay'
),
$sideNav
=
$
(
'.side-nav'
),
$subNav
=
$
(
'.sub-nav'
),
bannerSwiper
,
recommendSwiper
,
hotBrandsSwiper
,
...
...
@@ -77,14 +78,16 @@ $sideNav.on('touchend', 'li', function (e) {
});
//返回一级导航,收起二级导航
$
(
'.sub-nav'
)
.
each
(
function
()
{
$
subNav
.
each
(
function
()
{
$
(
this
).
find
(
'li'
).
eq
(
0
).
on
(
'touchend'
,
function
(
e
)
{
$
(
'.sub-nav'
).
removeClass
(
'show'
);
e
.
stopPropagation
();
return
false
;
});
}).
on
(
'touchend'
,
function
()
{
$
(
'.sub-nav'
).
find
(
'li'
).
removeClass
(
'current'
);
}).
on
(
'touchend'
,
function
(
e
)
{
if
(
e
.
currentTarget
!==
e
.
target
)
{
$subNav
.
find
(
'li'
).
removeClass
(
'current'
);
}
});
//头部banner轮播
...
...
static/sass/home/_side-nav.scss
View file @
2029d0b
.side-nav
{
display
:
table-cell
;
display
:
block
;
background
:
#fff
;
position
:
fixed
;
top
:
0
;
bottom
:
0
;
// left: 0;
right
:
640rem
/
$pxConvertRem
;
width
:
540rem
/
$pxConvertRem
;
z-index
:
-1
;
...
...
@@ -116,8 +117,9 @@
bottom
:
0
;
top
:
0
;
left
:
0
;
width
:
100%
;
width
:
540rem
/
$pxConvertRem
;
background
:
#fff
!
important
;
overflow
:
hidden
;
@include
transform
(
translateX
(
540rem
/
$pxConvertRem
));
@include
transition
(
transform
0
.3s
);
...
...
Please
register
or
login
to post a comment