How to add custom classes to whole table, wrapper, thead, tbody, etc.
How to add custom classes to whole table, wrapper, thead, tbody, etc.
This has got to be a commonly asked question, but I don't see it explicitly exemplified anywhere. If I'm using, let's say, 3 tables on one page, and I want unique styling for them, and I'm using JQuery UI, I obviously need to be able to change or add classes at any level of the table.
Where is this process documented, and/ or how can I add classes to any / every element of a table using DataTables?
Where is this process documented, and/ or how can I add classes to any / every element of a table using DataTables?
This discussion has been closed.
Replies
[code]
etc
[/code]
would that work for you?
Allan
I'd like to have utter control over the tables, and while I am declaring a thead and tbody, those other datatable elements are what I really want to get at.
$.fn.dataTableExt.oStdClasses.sWrapper = 'no-margin last-child';
$.fn.dataTableExt.oStdClasses.sInfo = 'message no-margin';
$.fn.dataTableExt.oStdClasses.sLength = 'float-left';
$.fn.dataTableExt.oStdClasses.sFilter = 'float-right';
$.fn.dataTableExt.oStdClasses.sPaging = 'sub-hover paging_';
$.fn.dataTableExt.oStdClasses.sPagePrevEnabled = 'control-prev';
$.fn.dataTableExt.oStdClasses.sPagePrevDisabled = 'control-prev disabled';
/* etc.... */
[/code]
[code]... [/code]
to at least be able to scope the table filter section when there are more than one table on a page, and I want each table to be styled independently and still use ThemeRoller...
Styling section of the documentation: http://datatables.net/styling/custom_classes
Allan
Allan