bind specific columns of a table row
Dear all!
How to I bind a click function to specific columns of a table row?
Btw, this is a (yet not answered) crosspost of http://datatables.net/forums/comments.php?DiscussionID=3185
I currently have this piece of code:
- $('#example tr').click( function() {
// selection stuff here, $(this) is the row
});
However, this binds the whole row. As there are checkboxes in the row, I don't want to have the cells containing them bound, too.
But, there is a problem: I need to know what row has been clicked on / to what row the cell belongs to.
I simply don't get it to work, I tried something like this:
$('#example tbody tr td:lt(7)').live('click', function() {
var nRow = $(this).parent();
});
Anyone help please? :)