I would like to enable the user to select a checkbox in a table, and then display the next table cell row data.
I have created a test project
http://jsfiddle.net/tonymaloney1971/8n4c42ap/
So, in my example if you select checkbox on row 1, I would like a alert box displaying item 1.
$("input[type='checkbox']").change(function (e) {
if ($(this).is(":checked")) {
$(this).closest('tr').addClass("highlight_row");
//this errors?
var itemID = $('.record_table', this).html();
alert(itemID);
} else {
$(this).closest('tr').removeClass("highlight_row");
}
});
Thanks