Styling > Examples > Javascript tabs > only Initialization example code displaying
Styling > Examples > Javascript tabs > only Initialization example code displaying
Under Examples > Styling (https://datatables.net/examples/styling/), the Javascript tabs only have the basic initialization of $('#example').DataTable(); The actual example JS code is missing. This is true for many of the Examples.
See this Example > Styling > Compact page to see what I'm referencing.
https://datatables.net/examples/styling/compact.html
Were the Styling Examples moved? Is this an error?
I need that Example code
This question has an accepted answers - jump to answer
Answers
Using
$('#example').DataTable();
initializes a Datatable with default options. Nothing else is needed for the example.The example you linked states this:
You can click the HTML tab to see the
compact
class being applied to thetable
.Are you asking about these?
https://datatables.net/examples/styling/index.html
The Styling docs are here if you need more information.
Kevin
Thanks Kevin! I thought all options were set on the Javascript side of things where the datatable is initialized, and missed that those classes were being applied in the HTML tab. Appreciate the clarification!