Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery Datatable: How can I change the sZeroRecords value after the table has been initialized?

I have a datatable that, when there are no records, sometimes should say "Click an item from above" and other times should say "No data available in table".

I can find no way to change the sZeroRecords string after table initialization.

Can anyone suggest a way to do this - or some other technique for getting the same behavior?

Thanks,

like image 624
Jr0 Avatar asked Oct 21 '22 03:10

Jr0


1 Answers

$(document).ready(function() {
    $('#example').dataTable( {
        "oLanguage": {
            "sEmptyTable": "Overridden message here"
        }
    });
});
like image 69
muzomar Avatar answered Dec 09 '22 21:12

muzomar