how to disable show entries property in jquery dat

2020-08-15 04:12发布

I have just started working with jquery. I used jquery data-table plugin for enabling table-view. Iam in need to disable show entries property. Can anyone help me in which js i need to disable the property?

I had followed this link but doesn't help. I don't know which js has to be modified. here

Thanks in Advance

4条回答
▲ chillily
2楼-- · 2020-08-15 04:51

notice the "paging" property in below example. once you set it to false. Show entries will get disabled.

$(document).ready(function() {
    $('#your_table_name').dataTable( {
        "paging":   false,
        "ordering": false,
        "info":     false
    } );
} );
查看更多
乱世女痞
3楼-- · 2020-08-15 04:59

This had worked for me. Use the code in your html you have built

$(document).ready(function () {
        var oTable = $('#example').dataTable({                    
            "aaData": orgContent,
            "bLengthChange": false //used to hide the property  
          });

As per latest documentation bLengthChange in above piece of code should be lengthChange.

查看更多
Summer. ? 凉城
4楼-- · 2020-08-15 05:07

you need to use this code:

$('#example').dataTable({ 
  "bInfo": false
});
查看更多
女痞
5楼-- · 2020-08-15 05:10

this works for me:

<table class="dataTable" data-role="datatable"  data-info="false">
     <tr>
          <td></td>
     </tr>
</table>

it's all.

查看更多
登录 后发表回答