I have a table with several rows, and I want to get all the TD data after clicking on a specific ROW row.
My table
<table>
<tr class="person">
<td class="id">1900</td>
<td class="name">John</td>
<td class="gender">Male</td>
</tr>
<tr class="person">
<td class="id">2000</td>
<td class="name">Pitt</td>
<td class="gender">Female</td>
</tr>
</table>
How can I get the id, name, gender after clicking on a string using jQuery.
Ex: If i click on John Row i should get 1900, John, Male and same for Pitt also
thank
source
share