How to highlight entire row, in Rowdetails +/- image click event.

How to highlight entire row, in Rowdetails +/- image click event.

jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
edited January 2011 in General
Hi Allan and fellow DataTables users,

Can anybody let me know how to highlight the row upon +/- image clicks in the Rowdetails?

Here is the code am using for row click event that works fine

[code]$("#xxxTable tbody tr").live("click", function(event){
$("td.row_selected", oTable.fnGetNodes()).removeClass('row_selected');
$(event.target).parent().find("td").addClass('row_selected');
});[/code]

Same won't work when I click the +/- images for Rowdetails :(

Replies

  • jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
    The following code worked for me!
    [code]$("#xxxTable tbody tr").live("click", function(event){
    $("td.row_selected", oTable.fnGetNodes()).removeClass('row_selected');
    $(event.target).closest('tr').find("td").addClass('row_selected');
    });[/code]

    Closing this.
This discussion has been closed.