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

127
Views
¿Cómo puedo hacer un clic para iniciar la animación?

requestAnimationFrame(loop); y estoy tratando de hacer clic en el botón para iniciar la animación, una vez que lo presionas, la animación comienza, descubrí el botón <button type="start" form="form1" value="start onclick="start()">start</button> Pero no sé cómo convertirlo en un script.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Si desea llamar a requestAnimationFrame(loop) , debe hacerlo así ...

 <button type="start" form="form1" value="start" onclick="requestAnimationFrame(loop)">start</button>
about 4 years ago · Juan Pablo Isaza Report

0

Aquí hay un fragmento de ejemplo:

 <button onclick="start()">start</button> <script> var animId=false; function start() { animId=requestAnimationFrame(loop); } function loop() { //your code here } // I added this in case you wanted to call a stop function stop() { animId && cancelAnimationFrame(animId); } </script>
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!