Hi this app is working but have few problems,example my (#join-game) button is didnt work after the append.You can check my files down,thanks for help.
MY JAVASCRIPT / JQUERY FILE (I think problem is not here.)
let gid = $(this).attr("class");
$.ajax({
url: "/join",
method: "POST",
data: { gameid: gid },
}).done(function (response) {
if (response === "Waiting for players...") {
return;
} else {
let lobbystatus = $(".lobby-status");
var count = 3;
let interval = setInterval(() => {
if (count === -1) {
clearInterval(interval);
startgame(response);
} else {
lobbystatus.text("Starts in " + count + " seconds...");
count--;
}
}, 1000);
}
});
});```
My script session.(check image).
(I think problem is javascript file or script tag because when i login to site firstly my javascript file is loading,cards is append after the javascript load but I tried reload javascript file and it didnt work too.[enter image description here][1])
[1]: https://i.stack.imgur.com/MI3cg.png