how to put multiple jquery dataTables in one page?

前端 未结 9 1416
迷失自我
迷失自我 2020-12-09 03:22

I want to use jquery dataTables to show something.

It works well when i just put one dataTable in one page, then i add one more, but they occupied almost the same p

9条回答
  •  再見小時候
    2020-12-09 04:07

    Still working on it... but this could be helpful

    The script

    // global the manage tables 
    var manageMemberTable;
    //var tbl1 = $('#webdesignTable').DataTable( );
    
    $(document).ready(function() {
    
         $('table.display').dataTable(); //focus here
    
        manageMemberTable = $("#webdesignTable").DataTable({
            "ajax": "webdesign_action/retrieve.php", //get data for your tables
            "order": []
        });
    
        domainregistrationTable = $("#domainregistrationTable").DataTable({
            "ajax": "domainregistration_action/retrieve.php", //get data for your tables
            "order": []
        });
    //It continues
    

提交回复
热议问题