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
Pasar variables entre funciones en JQuery

¿Cómo puedo pasar var selekcija a otra función? Necesito pasar var selekcija a otro archivo (load-epizode.php), pero mi var es otra función.

 var selekcija $(document).ready(function() { $('#sezona').change(function() { selekcija = 1; selekcija = $('#sezona').val(); console.log(selekcija); }); $('#epizds').load("/filmovi2/config/load-epizode.php", { NewSelekcija: selekcija }); });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

¿Quieres cargar contenido en cada evento de 'cambio'? Mover la carga dentro de la función del evento de cambio

 function onSelekcijaChange() { const selekcija = $('#sezona').val(); console.log(selekcija); $('#epizds').load("/filmovi2/config/load-epizode.php", { NewSelekcija: selekcija }); } $(document).ready(function() { onSelekcijaChange(); $('#sezona').change(onSelekcijaChange); });

No es el código JS mejor y óptimo, pero no quería cambiar mucho de su código.

about 4 years ago · Juan Pablo Isaza Report
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!