Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!