How can I change the color for empty table message?

How can I change the color for empty table message?

jjiang5jjiang5 Posts: 14Questions: 4Answers: 1

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:

This question has accepted answers - jump to:

Answers

  • jjiang5jjiang5 Posts: 14Questions: 4Answers: 1
    edited April 2021

    How can I change the color for empty table message?

  • jjiang5jjiang5 Posts: 14Questions: 4Answers: 1

    resolved. thanks

  • allanallan Posts: 61,848Questions: 1Answers: 10,134 Site admin
    Answer ✓

    Could you post your solutions if self-answering in future? Then others can also benefit.

    In this case, you can use CSS:

    td.dataTables_empty {
      background-color: red;
    }
    

    Allan

  • jjiang5jjiang5 Posts: 14Questions: 4Answers: 1
    Answer ✓

    $('#xxxDT .dataTables_empty').text('No records found')
    .css('color', '#FF0000');

This discussion has been closed.