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

117
Views
Adding Span class when i'm using using Jquery "replace" function

I think my problem is simple to resolve but i didn't find anything related to this. I just want to add a class id when i use JQuery replace.

Here i'm using this small script :

<script>
  $("body").html($("body").html().replace(" <strong>Mario</strong> game" , " <span class="class-id"><strong> Mario</strong> bros."));
  </script>

Can you help me? Thanks

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

0

what about

  $("body").replaceWith("<span class='red'><strong> Mario</strong> bros.");

Example here: https://codepen.io/polinq/pen/yLKNggV?editors=1111

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!