Custom toolbar elements don't work with language options

Custom toolbar elements don't work with language options

laminelamine Posts: 1Questions: 1Answers: 0
edited August 2016 in Free community support

Hi ,
First thanks for this awesome plugin , I have a problem with the custom element in toolbar when i comment the language line the custom element appear :

$('#example').DataTable( {
    "language": { "url": "//localhost/kaf88/js/Arabic.json"},
    "lengthMenu": [[10,50, 100, 150, -1], [10,50, 100, 150, "إظهار الكل"]],
         fixedHeader: true,
        /*
        */
    "dom": '<"toolbar">rlftip',

    } );

   $("div.toolbar").html('<b>this is me </b>');

Any suggestions Thanks of all .

Answers

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin

    Add your custom element inside initComplete. The problem is, when you use language.url it makes the table initialisation async. See the language.url reference documentation for more details.

    Allan

This discussion has been closed.