how to get row selection and highlighting going

how to get row selection and highlighting going

tricoloretricolore Posts: 3Questions: 0Answers: 0
edited July 2012 in General
Hi, I am trying to figure out how to get row selection (user clicks on a row and it lights up) going. I have followed the code in the examples, but it just is not working. Will appreciate any insight into what I am doing wrong. Here is my code:

$("#projectsTable tbody tr").click(function(e){
if ($(this).hasClass("row_selected"))
{
$(this).removeClass('row_selected');
}

else
{
oTable.$('tr.row_selected').removeClass("row_selected");
$(this).addClass("row_selected");
}
});


//DataTable general setting and initialization
oTable = $("#projectsTable").dataTable({
"bAutoWidth":true,
"bLengthChange": false,
"sPaginationType":"full_numbers"

});
This discussion has been closed.