Options through HTML "data-*" attributes
Options through HTML "data-*" attributes
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
That documentation can be found here:
https://datatables.net/manual/options#HTML-5-data-attributes
In fact there a specific example of how to set the order. Don't think there is a specific "data-" attributes list. Pretty sure you can make most things work. Please post if you have specific questions or issues setting an option.
Kevin
Thank you!