Setting Responsive default options generically.

Setting Responsive default options generically.

tangerinetangerine Posts: 3,054Questions: 24Answers: 357

I don't understand this part of the documentation:

Responsive can also be set to initialise by default, as shown in this example through the $.fn.dataTable.defaults.responsive property. Extending that, all of the Responsive options can also be set using this configuration option (i.e. use responsive as an object).
(https://datatables.net/extensions/responsive/examples/initialisation/default)

I have "responsive: true" in my $.fn.dataTable.defaults file, but can't figure out how to add Responsive options to be used by default. Does anyone have an example?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 13,112Questions: 25Answers: 3,080
    Answer ✓

    Do you mean taking something like this example and making a default configuration like this?
    http://live.datatables.net/husiseja/1/edit

    Kevin

  • tangerinetangerine Posts: 3,054Questions: 24Answers: 357

    Yep. Many thanks, Kevin.
    I was looking at making a separate $.fn.dataTable.defaults.responsive file, but now I see I was misinterpreting the docs.

Sign In or Register to comment.