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

131
Views
How to replace a same value in multiple rows JQuery

I would like to change all the values of a column in a table every time I get a new value. For this, I have a JS code (JQuery) and an HTML code. JQuery allows me to replace values with ".replaceWith". However, instead of replacing all the time values, it displays me one by one. First column = time 1, second column = time 2 etc. Would it be possible to do this differently without having to declare a new ID for each row? Thanks a lot.

(The CSS is not done yet, sorry for the questionable readability)

JS CODE


content2 = '<td>' + epochToDateTime(timestamp) + '</td>';
                  $('#tbody2').replaceWith(content2);
                  content3 = '<td>' + Com_success_rate + '</td>';
                  $('#tbody3').replaceWith(content3);
                  content4 = '<td>' + PLC_communication_failure + '</td>';
                  $('#tbody4').replaceWith(content4);

HTML CODE

<tr>
<td></td> 
<td>%D3 id= </td>
<td>ALM_LOCAL_COM@1</td>
<td>PLC communication failure</td>
<td id="tbody4"></td>
<td id="tbody2"></td>
</tr>

<tr> 
<td></td> 
<td>%DW4 id= </td>
<td>LOCAL_COM_RATE@1</td>
<td>Com success rate</td>
<td id="tbody3"></td>
<td id="tbody2"></td>
</tr> 

And what I get in the website : Table

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!