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

324
Views
¿Cómo acceder a $(esto) en el bloque $.ajax({ })?

Quiero acceder a los métodos del botón en el que se hizo clic dentro del bloque de ajax. ¡Quiero hacer mi primer juego y soy nuevo en javascript, por favor ayuda!

 $(document).on("click",".play",function(e){ e.preventDefault(); $(this).text("Confirming..");//clicked button I want to access in ajax scope stopint(); //get players' Ids var linkText = $(this).attr("href"); var link = new URL("http://"+linkText); var p1 = link.searchParams.get("player1"); var p2 = link.searchParams.get("player2"); console.log(p1+","+p2); $.ajax({ url: "matching_player.php", type: "POST", data: {player1 : p1, player2 : p2}, success: function(data){ $(this).text("Connecting..");//clicked button's text() } }); });
over 4 years ago · Santiago Trujillo
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!