periodic gather count update

Made it so the page updates the gather fill status in the navigation periodicaly (every 10 seconds)
This commit is contained in:
Absurdon 2016-12-21 18:30:12 +01:00 committed by Ari Timonen
parent 096b1fcd85
commit a6876b8d9d

View file

@ -80,12 +80,15 @@
</nav>
<script>
$(function () {
$.ajax({
datatype: "json",
url: "<%= gathers_url %>/gathers/current",
success: function (data) {
$("#gathercount").html(data.gatherers.length + "/12");
}
});
var gatherInterval = setInterval(function() {
$.ajax({
datatype: "json",
url: "<%= gathers_url %>/gathers/current",
success: function (data) {
$("#gathercount").html(data.gatherers.length + "/12");
}
});
},10000);
});
</script>
</script>