I saw several similar questions, but did not answer anything to this specific problem. Consider the following table:
<table id="foo" border="1px"> <tr> <td rowspan="2">one</td> <td>two</td> <td rowspan="2">three</td> <td>four</td> <td>five</td> </tr> <tr> <td rowspan="2">two</td> <td>four</td> <td>five</td> </tr> <tr> <td rowspan="2">one</td> <td>three</td> <td>four</td> <td>five</td> </tr> <tr> <td>two</td> <td>three</td> <td>four</td> <td>five</td> </tr> </table>
Using jQuery, how can I select all the elements in a specific column? For example, if I want to select column 3, I should get all td with “three” as the content.
jquery jquery-selectors html-table
Admsteck
source share