In order to provide complete styling flexibility, DataTables provides methods to customise the classes which are used for the various elements created by DataTables. These are fully detailed below, indicating what the various uses for, but it can be just as instructive to have a peak at the live DOM of an example table using Firebug, Webkit's Inspector, IE's developer tools, or any of the other options.
Two different sets of default classes are provided in DataTables, and which one is used is selected by the initialisation parameter:
sWrapper
Show details |
Applied to the DIV element that DataTables wraps around all elements it creates (including the table itself) |
sFilter
Show details |
Applied to the DIV element created for the filtering input |
sInfo
Show details |
Applied to the DIV element created for the current display information |
sPaging
Show details |
Applied to the DIV element created for the paging controls. Note that the name of the paging method used is postfixed to this class |
sLength
Show details |
Applied to the DIV element created for the display length changing control |
sProcessing
Show details |
Applied to the DIV element created for the processing display |
sPagePrevEnabled
Show details |
Previous paging button enabled |
sPagePrevDisabled
Show details |
Previous paging button disabled |
sPageNextEnabled
Show details |
Next paging button enabled |
sPageNextDisabled
Show details |
Next paging button disabled |
sPageJUINext
Show details |
Icon to use for the "next" button. Used for jQuery UI themes only. |
sPageJUIPrev
Show details |
Icon to use for the "previous" button. Used for jQuery UI themes only. |
sPageButton
Show details |
Generic class to give to the paging buttons |
sPageButtonActive
Show details |
Class to give the number in the list which represents the current page |
sPageButtonStaticDisabled
Show details |
Class to apply to the static buttons ('Next', 'Previous' etc) which would have no effect on the current page. |
sPageFirst
Show details |
Class to apply to the 'First' button |
sPagePrevious
Show details |
Class to apply to the 'Previous' button |
sPageNext
Show details |
Class to apply to the 'Next' button |
sPageLast
Show details |
Class to apply to the 'Last' button |
sStripeOdd
Show details |
Default for odd rows |
sStripeEven
Show details |
Default for even rows |
sRowEmpty
Show details |
Applied to the TR element that DataTables will create to show 'No matching records' information |
sSortDesc
Show details |
Applied to the TH element which has sorting descending applied to it. |
sSortable
Show details |
Applied to TH elements which are sortable (if they don't already have sorting asc or desc applied) |
sSortJUIAsc
Show details |
Icon class for sorting ascending |
sSortJUIDesc
Show details |
Icon class for sorting descending |
sSortJUI
Show details |
Icon class for a sortable column which does not have sorting acs or desc applied |
sSortableAsc
Show details |
This class is applied to column headers which have sorting enabled, but only allow sorting in the ascending direction. |
sSortableDesc
Show details |
This class is applied to column headers which have sorting enabled, but only allow sorting in the descending direction. |
sSortableNone
Show details |
Applied to TH elements which have sorting disabled on them (i.e. bSortable:false). |