I want to find out the column number that td belongs to using jQuery.
For instance:
<table> <tr> <td>Row1, Column1</td> <td>Row1, Column2</td> </tr> <tr class="totalRow"> <td>Row2, Column1</td> <td class="columnChild">Row2, Column2</td> </tr> </table>
I want to find the column number for a cell with the columnChild class. I know this is the second child of .totalRow and the second column in the table, but how to find it?
In the end, I want to add this to the array so that I can have columns with the columnChild class and add them to the array, so I can run the function for each row of the table on the second child.
I tried writing this several times, but I find the bit of the encoder block, so any help would be greatly appreciated. If you guys need more information, let me know and I will provide everything I can.
source share