mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 01:11:23 +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
096b1fcd85
commit
a6876b8d9d
1 changed files with 11 additions and 8 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue