I have a table:
<table> <tr> <td>Something</td> <td>Something Else</td> <td><input type='checkbox' value='clickme' id='yes'></td> </tr>
For the user, if they click on a row, they get more data about the row, and if they click on this flag, they will be presented with other options. how can i listen to every event in jquery. My problem is that the checkbox for the checkbox obviously disables the event for the row by clicking
$('tr').click(function(){ alert('you clicked the row'); }); $('#yes').change(function(){ alert('you clicked the checkbox'); });
if the item is being created dynamically, will this work:
$('#someTableId').on('click','#yes',function(e){ alert($(this).attr('id')); e.stopPropagation(); });
Update: the answer to part 2 is yes.
source share