add some listeners

This commit is contained in:
asyncnomi 2023-01-02 23:45:00 +01:00
parent c58cf255d3
commit 2636d30743
2 changed files with 14 additions and 4 deletions

View file

@ -80,11 +80,11 @@
</div>
<div id="admin-page" class="container" style="display: none">
<div class="admin-menu">Prank</div>
<div class="admin-menu">Trésors</div>
<div class="admin-menu">Activités</div>
<div id="admin-prank" class="admin-menu">Prank</div>
<div id="admin-treasure" class="admin-menu">Trésors</div>
<div id="admin-activity" class="admin-menu">Activités</div>
<div id="admin-content">
</div>
</div> <!-- end admin page -->

View file

@ -73,6 +73,16 @@ $("#logo").click(function () {
}
});
$("#admin-prank").click(() => {
get_admin("prank");
})
$("#admin-treasure").click(() => {
get_admin("treasure");
})
$("#admin-activity").click(() => {
get_admin("activity");
})
function get_admin(type) {
$("#admin-content").innerHTML = "";
$.ajax({