src/main/webapp/views/news.html
@@ -42,7 +42,7 @@ </body> <script src="../static/js/jquery/jquery-3.3.1.min.js"></script> <script> let autoScroll = true; top.autoScroll = true; function scrollUp(){ const scrollUp = document.getElementById('scroll-up'); @@ -56,12 +56,12 @@ }) $(document).on('click ','body', function () { autoScroll = false; top.autoScroll = false; }) setInterval(()=>{ $("body").append("<h1>Hello World</h1>"); if (autoScroll) { if (top.autoScroll) { window.scrollTo(0, document.body.scrollHeight) } }, 500)