Permissive ISC license, see LICENSE file, feel free to contact me for
questions or other terms.

"Lazy scroll" mode:

fixed column headers and renders only visible rows, this allows you to
"lazily" render millions of rows.

Officially supported browsers are:

Firefox and Firefox ESR.

Chrome and most recent webkit-based browsers.

IE10+.

Why? and a comparison

It was created because all the other datatable scripts suck balls.

Most Javascripts nowadays have a default dependency on jQuery, Bootstrap or other frameworks.

jQuery adds about 97KB and Bootstrap adds about 100KB to your scripts and CSS as a dependency.
This increases the CPU, memory and bandwidth consumption and latency. It also adds
complexity to your scripts.

jQuery was mostly used for backwards-compatibility in the Internet Explorer days, but is
most often not needed anymore. It contains functionality to query the DOM using CSS-like
selectors, but this is now supported with for example document.querySelectorAll.
Functionality like a JSON parser is standard available now: JSON.parse().

Column attributes

If "1" or "true" specifies if the column can be filtered,
default: "true".

data-parse

Specifies how to parse the values, default: "string",
which is datatable_parse_string(). See PARSING section
below.

data-sort

Specifies how to sort the values: default: "default",
which is datatable_sort_default(). See SORTING section
below.

data-sortable

If "1" or "true" specifies if the column can be sorted,
default: "true".

Parsing

By default only parsing for the types: date, float, int and string are
supported, but other types can be easily added as a function with the name:
datatable_parse_<typename>(). The parse functions parse the data-value
attribute when set or else the cell content (in order). Because of this
behaviour you can set the actual values as the data-value attribute and use
the cell content for display. This is useful to display and properly sort
locale-aware currency, datetimes etc.

Filtering

Filtering will be done case-insensitively on the cell content and when set also
on the data-value attribute. The filter string is split up as tokens separated
by space. Each token must match atleast once per row to display it.

Sorting

Sorting is done on the parsed values by default with the function:
datatable_sort_default(). To change this you can set a customname string on
the data-sort attribute on the column which translates to the function:
datatable_sort_<customname>().

In some applications locale values are used, like for currency, decimal numbers
datetimes. Some people also like to use icons or extended HTML elements inside
the cell. Because jsdatatable sorts on the parsed value (see section PARSING)
it is possible to sort on the data-value attribute values and use the cell
content for display.

For example:

currency, decimal numbers:
use data-value attribute with floating-point number, set data-parse
column to "float".
date/datetimes:
use data-value attribute with UNIX timestamps (type int), set
data-parse on column to "int" or set the data-parse attribute on
column to "date" which is datatable_parse_date(), then make sure to
use Zulu times, like: "2016-01-01T01:02:03Z" or other
time strings that are parsable as the data-value attribute.
icons:
generally use data-value attribute with integer as weight value to sort
on, set data-parse column to "int".

Dynamically update data

To update data dynamically see example-ajax.html for an example how to do this.

Caveats

A date, integer, float or other values must be able to parse properly, when
the parse function returns NaN, null or undefined etc. the sorting behaviour
is also undefined. It is recommended to always set a zero value for each
type.