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

134
Views
Array dentro de un Array y reemplace el valor en un className

Cuanto tiempo, (:

"durante" es la clase para poner un valor "dur" pero ReplaceContentInContainer() dentro de un Array.prototype.forEach devuelve más clase "durante". Lo mismo con ciclo para ()

¿Alguna idea de cómo salir de vale =>(dur) y si mi código está colocado correctamente? web, todo lo mejor

 var list = document.querySelectorAll(".media-el audio source"); var els = document.querySelectorAll('.during'); Array.prototype.forEach.call(list, function(el){ var nrc = el.src; getDuration(nrc).then(function(length) { var attr = document.createAttribute('duration'); attr.value = length; //console.log(attr); el.setAttributeNode(attr); sleep(1200).then(() => { dur = el.getAttribute("duration"); //3object value: 02:24, 03:58, 01:52 //ReplaceContentInContainer('during', dur); //return => 6 objecy and put only one of each... }); for (var i=0; i < els.length; i++) { //console.log(els[i]) //return 6 object els[i].innerHTML = dur; //place only first value } });

mientras que si lo ejecuto externo:

 for (var i=0; i < els.length; i++) { console.log(els[i]) //return 3 object Exactly! els[i].innerHTML = dur; // but value => dur is undefined }

edit=> 05 de noviembre de 2021 ... estaba asociado, pero para resolverlo lo enfoqué de manera diferente y obtuve la solución en mi otra pregunta. TnxU [todos] (:

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!