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

379
Views
Intenté convertir Jquery a Vanilla JS, pero no funciona

Tengo este Jquery y trato de convertirlo a JS puro. ¿Alguien puede ayudar?

 (function($) { $(&quot;.comments-content &gt; ol &gt; .comment&quot;).each(function() { var str = $(this).children(&quot;.comment-block&quot;).find(&quot;.comment-header &gt; .name &gt; span&quot;).text(); $(this).find(&quot;.comment-avatar&quot;).append(&quot;<span>&quot; + str.charAt(0) + &quot;</span>&quot;); }); })(jQuery);

Hasta ahora, he llegado aquí:

 var elements = document.querySelectorAll(&quot;.comments-content &gt; ol &gt; .comment&quot;); Array.prototype.forEach.call(elements, function(){ let str = this.children(&quot;.comment-block&quot;).find(&quot;.comment-header &gt; .name &gt; span&quot;).innerText; this.querySelectorAll(&quot;.comment-avatar&quot;).append(&quot;<span>&quot; + &quot; str.charAt(0) &quot; + &quot;</span>&quot;); });
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!