mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-31 05:30:36 +00:00
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:
parent
8ca9dfb7fe
commit
ac2e95799c
1 changed files with 11 additions and 8 deletions
|
@ -80,12 +80,15 @@
|
||||||
</nav>
|
</nav>
|
||||||
<script>
|
<script>
|
||||||
$(function () {
|
$(function () {
|
||||||
$.ajax({
|
var gatherInterval = setInterval(function() {
|
||||||
datatype: "json",
|
$.ajax({
|
||||||
url: "<%= gathers_url %>/gathers/current",
|
datatype: "json",
|
||||||
success: function (data) {
|
url: "<%= gathers_url %>/gathers/current",
|
||||||
$("#gathercount").html(data.gatherers.length + "/12");
|
success: function (data) {
|
||||||
}
|
$("#gathercount").html(data.gatherers.length + "/12");
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
},10000);
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
Loading…
Reference in a new issue