1
I have the following HTML code
<table>
<tr>
<td class="x">10</td>
<td class="x">10</td>
<td class="x">12</td>
<td class="x">18</td>
</tr>
</table>
Through jquery I can pick up and verify what the value inside the <td>
using the following function:
$(".x").text(function(index, item){
console.log(item);
{
How do I check if <td>
has the value 10
, and thus exchange the value 10
to a string, and then play into the <td>
that has the value 10
back with the value changed?
parseint($(".x")[index].innerHTML) === 10 ... $(".x")[index]. innerHTML = newValue
– Geovane da Silva de Jesus