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

139
Views
Cambiar la fuente de la imagen al pulsar el botón Atrás

Tengo un deslizador. Al hacer clic en el botón siguiente, la imagen se está cargando.

 var t=3 function next_btn(){ t+=3; var imgEl = document.querySelectorAll('.lazy'); for (let a = 0; a < t; a++) { if(imgEl[a].getAttribute('data-original')) { imgEl[a].setAttribute('src',imgEl[a].getAttribute('data-original')); imgEl[a].removeAttribute('data-original'); } } }

pero al hacer clic en el botón anterior, la imagen no se carga.

 function previous_btn(){ var imgEl = document.querySelectorAll('.lazy'); for (let a =imgEl.length; a >3; a--) { if(imgEl[a].getAttribute('data-original')) { imgEl[a].setAttribute('src',imgEl[a].getAttribute('data-original')); imgEl[a].removeAttribute('data-original'); } } }

Probé otras cosas pero no funcionó. ¿Cómo puedo arreglar?

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!