v0.11.2 - Added autoscroll

This commit is contained in:
frederikpyt 2020-09-02 15:19:18 +02:00
parent ebd80a31b8
commit b4d80ac76f
1 changed files with 13 additions and 0 deletions

View File

@ -44,11 +44,24 @@
<script src="{{ mix("/js/app.js") }}"></script>
<script type="text/javascript">
speed = 10000;
function scroll(speed) {
$('html, body').animate({ scrollTop: $(document).height() - $(window).height() }, speed, function() {
$(this).animate({ scrollTop: 0 }, speed);
});
}
$(document).ready(function () {
setInterval(function(){ // There has to be a space between " and # or it will not load correctly
$('#mainDiv').load(" #mainDiv");
}, (60000*1));
//Autoscroll
scroll(speed)
setInterval(function(){scroll(speed)}, speed * 2);
});
</script>
@yield("scripts")
</body>