32
rated 0 times
[
36]
[
4]
/ answers: 1 / hits: 15880
/ 12 Years ago, fri, march 9, 2012, 12:00:00
What is a good way to find the index of column by it's display text?
e.g.
<table>
<tr>
<td>ID</td>
<td>Name</td>
<td>Age</td>
</tr>
<tr>
...
</tr>
</table>
I would like to have something like
var nameIndex = getColIndex('Name'); // nameIndex = 1
Is there a quick / good way to do it? (Doesn't have to be jQuery, but would be nice)
More From » jquery