vanilla-datatables

js Styles
A lightweight, dependency-free javascript HTML table plugin.
Keywords
tableshtml tabledatatable
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 1.6.16
- 1.6.15
- 1.6.14
- 1.6.12
- 1.6.11
- 1.6.10
- 1.6.9
- 1.6.8
- 1.6.7
- 1.6.6
- 1.6.5
- 1.6.4
- 1.6.3
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.18
- 1.4.17
- 1.4.16
- 1.4.15
- 1.4.14
- 1.4.13
- 1.4.12
- 1.4.11
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.4
- 0.1.2
- 0.1.1
- 0.0.8
- 0.0.7
- 0.0.6
<script src=" https://cdn.jsdelivr.net/npm/vanilla-datatables@1.6.16/dist/vanilla-dataTables.min.js "></script>
<link href=" https://cdn.jsdelivr.net/npm/vanilla-datatables@1.6.16/dist/vanilla-dataTables.min.css " rel="stylesheet">
No default files set by the package author so the URLs are guessed. You can always browse all package files to use other ones.
Vanilla-DataTables
Due to time constraints this repo is no longer maintained. Please use the official fork over at fiduswriter/Simple-DataTables
A lightweight, extendable, dependency-free javascript HTML table plugin. Similar to jQuery DataTables, but without the dependencies.
Features
- Sortable columns
- Pagination
- Searchable
- Customisable layout
- Customisable labels
- Customise column rendering
- Load data via AJAX requests
- Export to common formats like
csv
,txt
json
, andsql
- Import
csv
andjson
data - Control column visibility
- Reorder or swap columns
- moment.js integration for sorting columns with datetime strings
- Extentable with custom plugins See the wiki (v1.6.0 and above)
Documentation | Latest Version
Demos
- Default Setup
- Remote Data
- Datetime Strings
- Column Manipulation
- Editor Plugin
- Stress Test
- Programmatic Access
Install
Bower
bower install vanilla-datatables --save
npm
npm install vanilla-datatables --save
Browser
Grab the files from one of the CDNs and include them in your page:
<link href="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<script src="https://unpkg.com/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>
//or
<link href="https://cdn.jsdelivr.net/npm/vanilla-datatables@latest/dist/vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/vanilla-datatables@latest/dist/vanilla-dataTables.min.js" type="text/javascript"></script>
You can replace latest
with the required release number.
CDNs courtesy of unpkg and jsDelivr
Quick Start
Then just initialise the plugin by either passing a reference to the table or a CSS3 selector string as the first parameter:
var myTable = document.querySelector("#myTable");
var dataTable = new DataTable(myTable);
// or
var dataTable = new DataTable("#myTable");
You can also pass the options object as the second paramater:
var dataTable = new DataTable("#myTable", {
searchable: false,
fixedHeight: true,
...
});
Don't forget to check the wiki out for further help.
If this project helps you then you can grab me a coffee or beer to say thanks.
Copyright © 2017 Karl Saunders | MIT license