showing results for - "jquery datatable background text color"
Matys
21 Aug 2016
1$(document).ready( function () {
2  var table = $('#example').DataTable({
3    columnDefs: [{targets: [0, 1, 2, 3, 4, 5],
4                    render: function ( data, type, row ) {
5                      var color = 'green';
6                      if (data == "example") {
7                        color = 'green';
8                      } 
9                      if (data > 10) {
10                        color = 'blue';
11                      }
12                      if (data < 60) {
13                        color = 'red';
14                      }
15                      return '<span style="color:' + color + '">' + data + '</span>';
16                    }
17               }]
18  });
19} );
Vanessa
22 Sep 2018
1$(document).ready( function () {
2  var table = $('#example_table').DataTable({
3    columns: [
4      {
5        data: "example_data",
6        render: function (data) {
7          if (data == true) {
8            return '<h5><span class="badge badge-success">Example</span></h5>';
9          } else {
10            return '<h5><span class="badge badge-danger">Another Example</span></h5>';
11          }
12        },
13      },
14    ]
15  });
16} );
queries leading to this page
how to add atribut color in td datatabledata table background colorjquery datatable change color of celljquery datatable color cellhow to change the color of text in datatableschange background color of row jquery datatabledatatable jquery column colorchange text color datatables rowjquery datatable change background colordatatable print font color for tablejquery datatable change background color of whole tablechange background color of jquery datatablehow to change background color of row in datatable jqueryjquery datatables color celldatatable cell background color printjquery datatable color rowsdatatable column colordatatable color columndatatables text colordatatable css background coloradd background color in datatablecolor column text red color datatables 3bdatatables color buttonsbackground color in datatablehow to change background color in jquery datatabledatatable textcolordatatable print text colorjavascript jquery datatable cell colorjquery datatable text colorset color row datatable jqchange color cell datatable jquerydatatables background colordatatable background colorjquery datatable column background colorcolor row datatablechange color tr datatabledatatable font colordatatables colorhow to give color in datatabledatatable cell background colorhow to change background color in cell jquery datatablejquery datatable background text colorchange colors datatabledatatable colorjquery datatable cell background colorchange color datatable jsjquery datatable background text color