Specific settings depending on CSS classes of datatable

Specific settings depending on CSS classes of datatable

ifischerifischer Posts: 6Questions: 1Answers: 1
edited January 2013 in General
Say I have 2 types of tables throughout my application: one with an index column and one without an index column. For the indexed tables I always need to define some special settings, at least these:
[code]
table = $("#mytable").dataTable({
fnDrawCallback: $.fn.dataTableExt.oApi.fnRedrawCounter,
oColVis: {
aiExclude: [ 0 ]
}
(...)
});
[/code]
I would like to define these settings globally depending on the class attached to the table.
So if the table has the CSS class "counter", it should get the settings from above, else not.
There are also several other settings that I would like to set in my global javascript depending on the tables CSS classes.

Is it possible to specify the datatable settings depending on the css classes attached to the table?
This discussion has been closed.