Rorkebrocanar
New Member
I am using datatables plugin.My table contains a column name css which contains css for columns in that row.
For ex, table in database is as follows, \[code\] Name Priority Percent CSS --------------------------------------------------------- abc high 50 .priority{color:red} .percent {color:yellow} xyz low 70 .priority{color:green} .percent {color:green} pqr medium 10 .priority{color:yellow} .percent {color:red}\[/code\]Now while showning the datatable I dont want to include the css column but I want to apply the css on perticular cell.I am trying to achieve something like below,\[code\]$('#example').dataTable({ "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { $(row).children().each(function(index, td){ // perform operation here }); return nRow; }\[/code\]I don't understand how to add css for particular \[code\]<td>\[/code\] using css from \[code\]<td>\[/code\] of same row.Please help
For ex, table in database is as follows, \[code\] Name Priority Percent CSS --------------------------------------------------------- abc high 50 .priority{color:red} .percent {color:yellow} xyz low 70 .priority{color:green} .percent {color:green} pqr medium 10 .priority{color:yellow} .percent {color:red}\[/code\]Now while showning the datatable I dont want to include the css column but I want to apply the css on perticular cell.I am trying to achieve something like below,\[code\]$('#example').dataTable({ "fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) { $(row).children().each(function(index, td){ // perform operation here }); return nRow; }\[/code\]I don't understand how to add css for particular \[code\]<td>\[/code\] using css from \[code\]<td>\[/code\] of same row.Please help