Highlighting row on click.
Highlighting row on click.
jQuery_user
Posts: 27Questions: 0Answers: 0
Hello fellow DataTables users,
I am using following code to highlight row on click:
[code]$("#tableId tbody tr").live("click", function(event){
$("td.row_selected", oTable.fnGetNodes()).removeClass('row_selected');
$(event.target).parent().find("td").addClass('row_selected');
});[/code]
This works fine in IE, but not in firefox.
I also have a click event like this:
[code]$('#tableId tbody tr').click( function () {
var aData = oTable.fnGetData( this );
alert( aData[1] );
} );[/code]
In firefox, it seems the even/odd classes are over-riding the 'row_selected' class.
How to solve this.
Regards.
I am using following code to highlight row on click:
[code]$("#tableId tbody tr").live("click", function(event){
$("td.row_selected", oTable.fnGetNodes()).removeClass('row_selected');
$(event.target).parent().find("td").addClass('row_selected');
});[/code]
This works fine in IE, but not in firefox.
I also have a click event like this:
[code]$('#tableId tbody tr').click( function () {
var aData = oTable.fnGetData( this );
alert( aData[1] );
} );[/code]
In firefox, it seems the even/odd classes are over-riding the 'row_selected' class.
How to solve this.
Regards.
This discussion has been closed.
Replies
Example:
[code].row_selected {
background-color: yellow !important;
}[/code]
I already added that to my CSS. What else could be missing. It works fine in IE, but not in Firefox.
Thanks