diff --git a/public/js/index.js b/public/js/index.js index 0708240..dde36cc 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -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"); } diff --git a/public/js/pretty.js b/public/js/pretty.js index 6fff4d0..52882e9 100644 --- a/public/js/pretty.js +++ b/public/js/pretty.js @@ -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"); } \ No newline at end of file