Highlight row with server side

Highlight row with server side

jankejanke Posts: 19Questions: 0Answers: 0
edited March 2010 in General
I want highlith rows on mouse over with a server side datatables Inspiring of http://datatables.net/examples/api/highlight.html
I put this code on fnRowCallback
[code]
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
$(nRow).hover( function() {
/* Check if we are adding or removing a row */
if ( aData[7] == 1 )
{
aData[7] = 0;
}
else
{
aData[7] = 1;
}

/* Change the class based on selection */
this.className = (aData[7] == 1) ?
this.className+'highlighted' :
this.className.replace( /highlighted/, "" );
} );


return nRow;
}
[/code]
This works well on the mouse over event but if i click on the row after when the mouse is over this row there is no effect
Thanks sorry for my english !!!
This discussion has been closed.