I have this markup
<table id="myexample" class="myclass">
<thead>
<tr>
<th><input type="checkbox" value="tableoption1"> Username</th>
<th> Something </th>
<th> Something </th>
<th> Something </th>
<th> Something </th>
<th> Something </th>
<th> Something </th>
</tr>
</thead>
<tbody>
<tr>
<td> <input id="user1" type="checkbox" value="tableoption1"> John Smith </a></td>
<td> Nickname</td>
<td> Address </td>
<td> Registerd</td>
<td>10-10-2014 </td>
<td>09-11-2014</td>
<td>03-02-2014</td>
</tr>
</table>
How can I select with Jquery the input element with id=user1 ?
I have already tried this but doesnt work
$("#users tbody tr td input").click(function(){
alert ("success");
});
Any suggestion ?
id's are unique so there is no need to think about nesting; just ask for it directlyusers? What is with the random</a>?