v0.11.2 - Added autoscroll
This commit is contained in:
parent
ebd80a31b8
commit
b4d80ac76f
|
@ -44,11 +44,24 @@
|
||||||
|
|
||||||
<script src="{{ mix("/js/app.js") }}"></script>
|
<script src="{{ mix("/js/app.js") }}"></script>
|
||||||
<script type="text/javascript">
|
<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 () {
|
$(document).ready(function () {
|
||||||
setInterval(function(){ // There has to be a space between " and # or it will not load correctly
|
setInterval(function(){ // There has to be a space between " and # or it will not load correctly
|
||||||
$('#mainDiv').load(" #mainDiv");
|
$('#mainDiv').load(" #mainDiv");
|
||||||
}, (60000*1));
|
}, (60000*1));
|
||||||
|
|
||||||
|
//Autoscroll
|
||||||
|
scroll(speed)
|
||||||
|
setInterval(function(){scroll(speed)}, speed * 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@yield("scripts")
|
@yield("scripts")
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue