I'm a bit stuck trying to resolve this problem. I need get content of a few cells, and after this do update inner text of this cells
For example, I need to get values of cells with class = 2 and class = 4 in each row, and after this, update their inner text
I tried to do it by this code:
$(element).each(function ()
{
// code code code
});
But isn't really something, what i need, because this code just get each element at each row, but i need get a few elements at each row at one time
It's should be lookin something like :
- get row.
- get elements with class = 1 and class = 2 at current row
- send their content to script
- update content of cells
- get next row
- etc
Here is example table:
<table>
<tr>
<td class="1"> Cell One </td>
<td class="2"> Cell Two </td>
<td class="3"> Cell Three </td>
<td class="4"> Cell Four </td>
</tr>
<tr>
<td class="1"> Also one Cell One </td>
<td class="2"> Also one Cell Two </td>
<td class="3"> Also one Cell Three </td>
<td class="4"> Also one Cell Four </td>
</tr>
</table>
**
And also. .
**
I need send Ajax Query, for each row in table, with inner text of 2 cells of current row ajax.php?id=column1&val=column2