Options through HTML "data-*" attributes

Options through HTML "data-*" attributes

pdacpdac Posts: 2Questions: 1Answers: 0

Maybe I've not looked in the right place, but I cannot find any examples of how DataTables can be initialised using HTML "data-*" attributes.

Specifically, what I want to allow the user to sort (order) the table presented to them using DataTables. I want to be able to specify the initial sort column via a "data-*" attribute in the HTML. Is this possible? If so, what is the attribute name, what HTML element is it applied to and what value do I need to give it.

Can anyone help?
(Ideally, I would like a list of "data-*" attributes that DataTables recognises and how to use them - does such a list exist?)

Answers

This discussion has been closed.