jQuery - add onclick to TR
- by Guus
I use Richfaces and one of the rich:dataTable generates this html:
<form id="scheduleForm">
<table id="scheduleForm:rowList">
<tr>
<td></td>
</tr>
</table>
</form>
I want to act on a click on a TR for this table. How can I do this?
The following also works for other tables on the page and I get the alert() for the other rows as well, and I don't want that.
jQuery('#scheduleForm:rowList tr').click(function(event) {
alert(1);
});