I'm generating this table using a for loop, and after it's generated, I want to be able to click each generated row individually so it can open a new page with detailed information of the item clicked.
The code for the table is as follows:
<fieldset>
<table>
<thead>
<tr>
<th>Codigo </th>
<th>Nombre </th>
<th>Lider </th>
<th>Socios </th>
</tr>
<?php if(isset($nombreClub)){ for($y = 0; $y <count($nombreClub); $y++) {
echo "<tr>".
"<td>" . $id[$y] . "</td> " .
"<td>" . $nombreClub[$y] . "</td>" .
"<td>" . $liderVoluntario[$y] . "</td>" .
"<td>" . $memberSearch[$y][0] . "</td>" .
"</tr>";
}}
?>
</thead>
<tbody>
</tbody>
</table>
</fieldset>
Specifically, I'm trying to get the value (e.g. 1,2,3,etc) but I don't know how to code it through jquery or ajax and specifically get the value I want from [$y].
I tried to explain myself as best I could. If you need anything else regarding code or information please let me know.
Give you TR an id and class. Put the listener on the class and use the id to redirect or load the data. This should at least get you started and pointed in the correct direction.