<table id="tabla_autos">
<thead>
<tr>
<th>Patente</th>
<th>Color</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<tr id="1">
<td>LJ5213</td>
<td id="id_color">Azul</td>
<td>10</td>
</tr>
<tr id="2">
<td>JK5123</td>
<td id="id_color" >Amarillo</td><!-- color a reemplazar-->
<td>15</td>
</tr>
<tr id="3">
<td>YH512</td>
<td id="id_color">cafe</td>
<td>23</td>
</tr>
<tr id="3">
<td>FD6521</td>
<td id="id_color">Amarillo</td><!-- color a reemplazar-->
<td>56</td>
</tr>
</tbody>
</table>
I need to change the Color column when it is yellow and replace it with orange, this is what I have:
$("#tabla_autos").find("tbody").find("td").each(function(){
if ($(this).attr("id") == "id_color") {
$("#id_color").text("Naranjo");
}
});