c0cb3db92f
New: CommonJS will load jQuery if it wasn't passed in Fix: Bootstrap, Foundation and jQuery UI integration Javascript files use module.exports correctly Dev: Change the file include "function" name to not conflict with `require` - AMD / RequireJS - The Require documentation strongly discorages using a named module, but I've used this in the past as the plug-ins need a name to depend upon themselves. This is still `datatables` but if the developer is using Require and it resolves automatically to a different name (which it may depending upon their configuration) they can use a map option to map their name to `datatables`. See https://github.com/moment/moment/issues/1095 - CommonJS - Based on the disscussion in https://github.com/DataTables/Plugins/issues/199 it seems that some developers like to pass a certain version of jQuery in. This modification allows them to do so while retaining backwards compatiblity. - Integration files - The UMD wrapper for these files have been restructured to be easier to follow. Also, based on the discussion in the Plugins issue noted above you can now pass in a jQuery instance or not and likewise a DataTables object or not. - To avoid direct conflict with `require()` the build scripts have been updated to use a "function" called `_buildInclude`. Ultimatily this should really be updated to use grunt or similar. |
||
---|---|---|
examples | ||
media | ||
.datatables-commit-sync | ||
.gitignore | ||
bower.json | ||
composer.json | ||
Contributing.md | ||
dataTables.jquery.json | ||
license.txt | ||
package.json | ||
Readme.md |
DataTables plug-in for jQuery
DataTables is a table enhancing plug-in for the jQuery Javascript library, adding sorting, paging and filtering abilities to plain HTML tables with minimal effort. The stated goal of DataTables is:
To enhance the accessibility of data in HTML tables.
To meet this goal, DataTables is developed with two distinct groups of users in mind:
-
You the developers using DataTables. For developers DataTables provides a wide array of options for how data should be obtained, displayed and acted upon, along with an extensive API for accessing and manipulating the table.
-
End users. For those using the interface DataTables presents, actions to get the most from the information contained in tables, such as sorting and filtering, along with paging and scrolling of the data in table, are easy to use, intuitive and fast.
Installation
In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page. See the DataTables manual for details on how to do this using the latest version of DataTables.
Usage
In its simplest case, DataTables can be initialised with a single line of Javascript:
$('table').dataTable();
where the jQuery selector is used to obtain a reference to the table you want to enhance with DataTables. Optional configuration parameters can be passed in to DataTables to have it perform certain actions by using a configuration object as the parameter passed in to the DataTables constructor. For example:
$('table').dataTable( {
paginate: false,
scrollY: 300
} );
will disable paging and enable scrolling.
A full list of the options available for DataTables are available in the documentation.
Documentation
Full documentation of the DataTables options, API and pug-in interface are available on the DataTables web-site. The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further.
Support
Support for DataTables is available through the DataTables forums and commercial support options are available.
License
DataTables is release under the MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact (specifically the comment block which starts with /*!
.