Fixed scroll to body might not animate

This commit is contained in:
Wu Cheng-Han 2015-09-25 14:08:02 +08:00
parent e64249453f
commit 6b383d49bb
2 changed files with 4 additions and 4 deletions

View file

@ -759,7 +759,7 @@ function scrollToTop() {
scrollTop: 0
}, 100, "linear");
} else {
$(document.body).animate({
$('body, html').stop(true, true).animate({
scrollTop: 0
}, 100, "linear");
}
@ -776,7 +776,7 @@ function scrollToBottom() {
scrollTop: ui.area.view[0].scrollHeight
}, 100, "linear");
} else {
$(document.body).animate({
$('body, html').stop(true, true).animate({
scrollTop: $(document.body)[0].scrollHeight
}, 100, "linear");
}

View file

@ -69,13 +69,13 @@ $(document).ready(function () {
});
function scrollToTop() {
$(document.body).animate({
$('body, html').stop(true, true).animate({
scrollTop: 0
}, 100, "linear");
}
function scrollToBottom() {
$(document.body).animate({
$('body, html').stop(true, true).animate({
scrollTop: $(document.body)[0].scrollHeight
}, 100, "linear");
}