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:
sFilter
Show details |
Applied to the DIV element created for the filtering input |
Default (standard): | dataTables_filter |
Default (jQuery UI): | dataTables_filter |
sInfo
Show details |
Applied to the DIV element created for the current display information |
Default (standard): | dataTables_info |
Default (jQuery UI): | dataTables_info |
sLength
Show details |
Applied to the DIV element created for the display length changing control |
Default (standard): | dataTables_length |
Default (jQuery UI): | dataTables_length |
sProcessing
Show details |
Applied to the DIV element created for the processing display |
Default (standard): | dataTables_processing |
Default (jQuery UI): | dataTables_processing |
sPagePrevEnabled
Show details |
Previous paging button enabled |
Default (standard): | paginate_enabled_previous |
Default (jQuery UI): | fg-button ui-state-default ui-corner-left |
sPagePrevDisabled
Show details |
Previous paging button disabled |
Default (standard): | paginate_disabled_previous |
Default (jQuery UI): | fg-button ui-state-default ui-corner-left ui-state-disabled |
sPageNextEnabled
Show details |
Next paging button enabled |
Default (standard): | paginate_enabled_next |
Default (jQuery UI): | fg-button ui-state-default ui-corner-right |
sPageNextDisabled
Show details |
Next paging button disabled |
Default (standard): | paginate_disabled_next |
Default (jQuery UI): | fg-button ui-state-default ui-corner-right ui-state-disabled |
sPageJUINext
Show details |
Icon to use for the "next" button. Used for jQuery UI themes only. |
Default (standard): | |
Default (jQuery UI): | ui-icon ui-icon-circle-arrow-e |
sPageJUIPrev
Show details |
Icon to use for the "previous" button. Used for jQuery UI themes only. |
Default (standard): | |
Default (jQuery UI): | ui-icon ui-icon-circle-arrow-w |
sPageButton
Show details |
Generic class to give to the paging buttons |
Default (standard): | paginate_button |
Default (jQuery UI): | fg-button ui-state-default |
sPageFirst
Show details |
Class to apply to the 'First' button |
Default (standard): | first |
Default (jQuery UI): | first ui-corner-tl ui-corner-bl |
sPagePrevious
Show details |
Class to apply to the 'Previous' button |
Default (standard): | previous |
Default (jQuery UI): | previous |
sPageNext
Show details |
Class to apply to the 'Next' button |
Default (standard): | next |
Default (jQuery UI): | next |
sPageLast
Show details |
Class to apply to the 'Last' button |
Default (standard): | last |
Default (jQuery UI): | last ui-corner-tr ui-corner-br |
sStripeOdd
Show details |
Default for odd rows |
Default (standard): | odd |
Default (jQuery UI): | odd |
sStripeEven
Show details |
Default for even rows |
Default (standard): | even |
Default (jQuery UI): | even |
sRowEmpty
Show details |
Applied to the TR element that DataTables will create to show 'No matching records' information |
Default (standard): | dataTables_empty |
Default (jQuery UI): | dataTables_empty |
sSortDesc
Show details |
Applied to the TH element which has sorting descending applied to it. |
Default (standard): | sorting_desc |
Default (jQuery UI): | ui-state-default |
sSortable
Show details |
Applied to TH elements which are sortable (if they don't already have sorting asc or desc applied) |
Default (standard): | sorting |
Default (jQuery UI): | ui-state-default |
sSortJUIAsc
Show details |
Icon class for sorting ascending |
Default (standard): | |
Default (jQuery UI): | css_right ui-icon ui-icon-triangle-1-n |
sSortJUIDesc
Show details |
Icon class for sorting descending |
Default (standard): | |
Default (jQuery UI): | css_right ui-icon ui-icon-triangle-1-s |
sSortJUI
Show details |
Icon class for a sortable column which does not have sorting acs or desc applied |
Default (standard): | |
Default (jQuery UI): | css_right ui-icon ui-icon-carat-2-n-s |
sSortableNone
Show details |
Applied to TH elements which have sorting disabled on them (i.e. bSortable:false). |
Default (standard): | sorting_disabled |
Default (jQuery UI): | ui-state-default |