Mission: To bind a click to the first TD of each row, and open the div on the LAST column.
$("a.hideLast").click( function() { $("table tr").each(function(i){ $(this).children("td:last").toggle(); } ); }); $("tr").each(function(i){ $(this).children("td:first").click( function() { $(this).parents("tr").children("td:last").children("div").show(); } ); });
Toggle Last Column

Col 1 - Row 1 - Click me
Col 2 - Row 1
Col 3 - Row 1
Col 4 - Row 1
Col 5 - Row 1
Col 1 - Row 2 - Click me
Col 2 - Row 2
Col 3 - Row 2
Col 4 - Row 2
Col 5 - Row 2
Col 1 - Row 3 - Click me
Col 2 - Row 3
Col 3 - Row 3
Col 4 - Row 3
Col 5 - Row 3
Col 1 - Row 4 - Click me
Col 2 - Row 4
Col 3 - Row 4
Col 4 - Row 4
Col 5 - Row 4
Col 1 - Row 5 - Click me
Col 2 - Row 5
Col 3 - Row 5
Col 4 - Row 5
Col 5 - Row 5