Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

129
Visualizações
Jquery & Javascript didnt work when i create element with socket io

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
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda