简体   繁体   中英

Datatables, how to change appearance

How you can see i use datatables to style my tables:

在此处输入图片说明 What disturbs me is , that the plugin adds an line above my table: 困扰我的是,该插件在我的表格上方添加了一行:

Showing 1  to 14 of 14 entries

How do i have to cahnge my code, so that this wont be displayed anymore?

problem is that i styled my rows with backgound-colors, but how you can see when i press on one of the headings for example "typ", datatables overwrites my colors with the standard blue tones! 问题是我使用背景色设置了行的样式,但是当我按下诸如“ typ”这样的标题之一时,如何看到数据表会用标准的蓝色调覆盖我的颜色!

My code: Thanks to all!

 jQuery ->
$('#treatment').dataTable
"bPaginate": false,
"sScrollY": "400px",
    "bScrollCollapse": true

Firstly, in order to remove the 'entries' info, you must add the option 'bInfo' with the value of 'false':

jQuery ->
$('#treatment').dataTable
    "bPaginate": false,
    "sScrollY": "400px",
    "bScrollCollapse": true,
    "bInfo": false // to disable the entries info.

Its always a good idea to read the documentation .

Lastly, given you have not given a complete reproduction of your experienced problem, the following is a shot in the dark based on the limited information provided;

You may wish to modify/add the css classes to your own css file that is included last in the document, tr.odd.gradeA td.sorting_1 and tr.even.gradeA td.sorting_1 .

Always remember to inspect the elements with your browser's development tools, which would allow you to see which classes you need to modify, and which options to search for in the documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM