mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
edit js/ditto
This commit is contained in:
parent
fb58b88766
commit
5854ef1372
@ -255,10 +255,12 @@ function router() {
|
||||
$('html, body').animate({
|
||||
scrollTop: $('#content').offset().top
|
||||
}, 200);
|
||||
console.log('no perc');
|
||||
} else {
|
||||
$('html, body').animate({
|
||||
scrollTop: Boolean(perc)?($('body').height()-$(window).height())*perc:$('#content').offset().top
|
||||
}, 200);
|
||||
console.log('perc');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user