I am trying to make it so that when the user clicks on a row in the table, it highlights:
I am using the jquery datatables plugin here:
http://datatables.net/
My CSS
.row-modified {
background-color: '#000';
}
My Event Handler
$("#mytable tbody tr").live("click", function(event){
console.log("Row Clicked");
$(event.target).parent().find("td").addClass('row-modified');
});
What is wrong with what I am doing? (note: I am suing the default CSS provided with datatables).
that’s the only changed needed (removed the ” that wrapped the color , and added the !important)