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

149
Views
El detector de eventos en el intervalo requiere que actualice la página para poder hacer clic en ella

Tengo este problema que sé que es un error, si alguien ha tenido el mismo problema, ¿podría explicarlo? Esencialmente, el lapso "excla" requiere que el usuario actualice la página antes de poder hacer clic en ella, después de que el usuario actualice la página, pueden hacer clic en él tantas veces como quieran, estoy tratando de hacer que se pueda hacer clic desde el principio, ¿alguien sabe por qué sucede esto?

 <div class="popupz" id="popupx" href="javascript:void(0);" href="javascript:;"> <span class="popuptext" id="myPopup">Content</span> <span id="excla" class="ddop" onclick="myFunctionz()" style="background-color:#fff;" href="javascript:void(0);" href="javascript:;"> ! </span> </div> <script> // When the user clicks on div, open the popup const element = document.getElementById("excla"); element.addEventListener("click", function() { var popup = document.getElementById("myPopup"); popup.classList.toggle("show"); }); </script>
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Parece que tienes un montón de código extraño. Lo he recortado al mínimo para mostrar y ocultar myPopup

Solo necesitas agregar algo de css.

 // When the user clicks on div, open the popup const element = document.getElementById("excla"); element.addEventListener("click", function() { var popup = document.getElementById("myPopup"); popup.classList.toggle("show"); });
 #myPopup { visibility:hidden; } #myPopup.show { visibility:visible; }
 <div class="popupz" id="popupx"> <span class="popuptext" id="myPopup">Content</span> <span id="excla" class="ddop" style="background-color:#fff;"> ! </span> </div>


about 4 years ago · Santiago Trujillo 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!