Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
5425a2fd407e7d1464bd300d98ed220d7befac40
1 parent
560cfc40
return top
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
public/js/common/return-top.js
public/scss/components/_footer.css
public/js/common/return-top.js
View file @
5425a2f
...
...
@@ -17,6 +17,19 @@ function showOrNot() {
}
}
function
reposReturnTop
()
{
var
$top
=
$returnTop
.
parent
();
if
(
!
$top
.
hasClass
(
'service-top'
))
{
$top
=
$returnTop
;
}
if
(
$
(
window
).
width
()
<
1380
)
{
$top
.
addClass
(
'for-min'
);
}
else
{
$top
.
removeClass
(
'for-min'
);
}
}
$returnTop
.
click
(
function
()
{
$
(
'html,body'
).
animate
({
scrollTop
:
0
...
...
@@ -36,4 +49,10 @@ if ($returnTop.hasClass('hide')) {
$
(
'img'
).
load
(
showOrNot
);
}
reposReturnTop
();
if
(
$returnTop
.
length
)
{
$
(
window
).
resize
(
reposReturnTop
);
}
exports
.
returnTopShowOrNot
=
showOrNot
;
...
...
public/scss/components/_footer.css
View file @
5425a2f
...
...
@@ -42,8 +42,10 @@
color
:
#fff
;
}
&
.min
{
margin-left
:
505px
;
&
.for-min
{
right
:
20px
;
left
:
auto
;
margin-left
:
auto
;
}
}
}
...
...
Please
register
or
login
to post a comment