Mission: To bind a click to the first TD of each row, and open the div on the third column.
$("tr").each(function(i){
$(this).children("td:first").click( function() {
$(this).parents("tr").children("td:eq(2)").children("div").show();
} );
});
| Col 1 - Row 1 |
Col 2 - Row 1 |
Col 3 - Row 1 |
Col 4 - Row 1 |
Col 5 - Row 1 |
| Col 1 - Row 2 |
Col 2 - Row 2 |
Col 3 - Row 2 |
Col 4 - Row 2 |
Col 5 - Row 2 |
| Col 1 - Row 3 |
Col 2 - Row 3 |
Col 3 - Row 3 |
Col 4 - Row 3 |
Col 5 - Row 3 |
| Col 1 - Row 4 |
Col 2 - Row 4 |
Col 3 - Row 4 |
Col 4 - Row 4 |
Col 5 - Row 4 |
| Col 1 - Row 5 |
Col 2 - Row 5 |
Col 3 - Row 5 |
Col 4 - Row 5 |
Col 5 - Row 5 |