1
0
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:
ruanyf 2014-05-07 23:22:00 +08:00
parent fb58b88766
commit 5854ef1372

View File

@ -255,10 +255,12 @@ function router() {
$('html, body').animate({ $('html, body').animate({
scrollTop: $('#content').offset().top scrollTop: $('#content').offset().top
}, 200); }, 200);
console.log('no perc');
} else { } else {
$('html, body').animate({ $('html, body').animate({
scrollTop: Boolean(perc)?($('body').height()-$(window).height())*perc:$('#content').offset().top scrollTop: Boolean(perc)?($('body').height()-$(window).height())*perc:$('#content').offset().top
}, 200); }, 200);
console.log('perc');
} }
} }