Skip to content
This repository was archived by the owner on May 30, 2021. It is now read-only.
Karl edited this page Aug 10, 2017 · 24 revisions

ajax

Type: {String|Object}

Default: undefined

Load remote data set via AJAX requst.

The easiest method is to just pass the url to the remote data and the instance will process and insert the data.

var dataTable = new DataTable(myTable, {
    ajax: "some/url/data.json"
});

You can also pass an Object with the url and load properties:

var dataTable = new DataTable(myTable, {
    ajax: {
        url: "some/url/data.json",
        load: function(xhr) {
            // process and/or the response data
        }
    }
});

Clone this wiki locally