In the $(row).addClass('class') the first column is not changed by the class in css

In the $(row).addClass('class') the first column is not changed by the class in css

sandiioticssandiiotics Posts: 3Questions: 1Answers: 0
edited June 2020 in Free community support

The below code-

var table = $('#users_data').DataTable({
responsive: true,
"createdRow": function( row, data, dataIndex ) {
if ( data[4] == 'Online' ) {
$(row).addClass('online_device');
}
});
} );

This is the code used the 'online_device' is the css class used, everything working but the first element of the row is not changed by the css class 'online_device'~~~~

Replies

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,923

    You may need to update your custom CSS to include .sorting_1. See this thread. If this doesn't help then please provide the example Colin asked for.

    Kevi

This discussion has been closed.