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

209
Views
¿Cómo se reemplaza parte del texto en un atributo en todas las clases? (js puro)

Tengo un ejemplo de trabajo en jquery, pero hay problemas de compatibilidad, así que quiero volver a escribir esto en javascript puro. ¿Cómo hago esto correctamente?

 $(setInterval( function(){ $('.swiper-zoom-container > img').each(function(){ var srcset = $(this).attr('srcset');; $(this).attr('srcset', srcset.replace('s=1000x700','s=4000x4000')); }); }, 300 ));

Mi intento fue así, pero no es una opción viable:

 var elements = document.querySelectorAll('div.swiper-zoom-container > img'); setInterval(function() { elements.srcset = elements.srcset.replace('s=1000x700','s=4000x4000'); }, 300);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

var elements = document.querySelectorAll('div.swiper-zoom-container > img'); setInterval(function() { elements.forEach(el => el.srcset = el.srcset.replace('s=1000x700','s=4000x4000')); }, 300);
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!