jQuery: Which row number is clicked in table.
- by Muhammad Zeeshan
I have a table like this:
<table>
<tr>
<td>1</td><td>1</td><td>1</td>
</tr>
<tr>
<td>2</td><td>2</td><td>2</td>
</tr>
<tr>
<td>3</td><td>3</td><td>3</td>
</tr>
</table>
How can I get that which row(tr) number is clicked in table by user? For example I clicked at tr one it should return 1.
thanks