Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

139
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda