mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-25 03:02:21 +00:00
fix progress bar
This commit is contained in:
parent
ba19987cdb
commit
62f987c4cc
@ -257,8 +257,11 @@ function router() {
|
|||||||
if(location.hash !== '' || Boolean(perc)){
|
if(location.hash !== '' || Boolean(perc)){
|
||||||
if (!Boolean(perc)){
|
if (!Boolean(perc)){
|
||||||
$('html, body').animate({
|
$('html, body').animate({
|
||||||
scrollTop: $('#content').offset().top
|
scrollTop: ($('#content').offset().top + 10)
|
||||||
}, 200);
|
}, 300);
|
||||||
|
$('html, body').animate({
|
||||||
|
scrollTop: ($('#content').offset().top)
|
||||||
|
}, 300);
|
||||||
} else {
|
} else {
|
||||||
$('html, body').animate({
|
$('html, body').animate({
|
||||||
scrollTop: ($('body').height()-$(window).height())*perc
|
scrollTop: ($('body').height()-$(window).height())*perc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user