Skip to content

Commit f12c81f

Browse files
committed
fix scrolltop, close #4
1 parent 5c88174 commit f12c81f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

_sass/scroll-top.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,16 @@
2323
visibility: visible;
2424
@include opacity(1);
2525
}
26+
@media (hover:hover) {
27+
#site-scroll-top:hover {
28+
text-decoration: none;
29+
color: #fff;
30+
background: $grey;
31+
border-color: $light-grey;
32+
}
33+
}
2634

27-
#site-scroll-top:hover {
35+
#site-scroll-top:active {
2836
text-decoration: none;
2937
color: #fff;
3038
background: $grey;

assets/js/scrolltop.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ $(function () {
44
})
55

66
function scrollTop () {
7-
$('body').animate({
7+
$('html, body').stop().animate({
88
scrollTop: $($(this).attr('href')).offset().top
9-
}, 500)
9+
}, 500, 'swing')
1010
return false
1111
}
1212

0 commit comments

Comments
 (0)