Using multiple tables that share SOME settings

Using multiple tables that share SOME settings

CanisLupusCanisLupus Posts: 10Questions: 2Answers: 0
edited November 2014 in Free community support

On my site, I have many tables. Most of these tables share some general settings. Most also have some unique settings that apply only for that specific table. How can I implement this in a smart way, in order to avoid having to repeat my code?

For example, all tables I use, have pagination, but not all use "full_numbers". Some use "simple".
I also use the language setting to translate from default English to custom Swedish.
How can I set the translation of "Next" only ONE time in order to avoid repeating this translation for every table I have?

I tried as you would with CSS...

$ (#dt).DataTable() { some general settings shared by all tables with id = dt}

$ (#dt-unique).DataTable() { custom settings for dt-unique only}

... and then tried table id='dt dt-unique' but this does not seem to work.

I am fairly compentet with HTML and CSS, but only a jQuery / DataTables novice. I hope my question makes sense.

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.