Skip to content
This repository

Tables plug-in for jQuery

Fix: Accessiblity - Add `role=row` attribute to table rows

- Feedback from James Craig on improving the accessiblity of DataTables.
  Since the `role=grid` option is added to the DataTables table, we
  should also add `role=row` to the rows in the table so the browsers
  can see them correctly. As James notes, it is debatable if this is
  needed or not but it is required in current Chrome and Webkit.

- Webkit do now allow roles to be optional in the nighties - see: . Once Apple deploy
  this in a Safari update, and Chrome also deploy support, I think this
  should be removed from DataTables core, since it will no longer be
  needed in the latest browsers, and manipulating the DOM can hit
  performance a bit.
latest commit 80e748cc11
Allan Jardine authored April 22, 2014
Octocat-spinner-32 examples Dev: Renaming demo database table for naming consistency April 16, 2014
Octocat-spinner-32 media Fix: Accessiblity - Add `role=row` attribute to table rows April 22, 2014
Octocat-spinner-32 .datatables-commit-sync Fix: Accessiblity - Add `role=row` attribute to table rows April 22, 2014
Octocat-spinner-32 .gitignore Update: Readme with the beta release url February 04, 2014
Octocat-spinner-32 Add contributing file and update readme to be a markdown file with October 16, 2013
Octocat-spinner-32 Update: Readme for 1.10.0-beta.1 release February 04, 2014
Octocat-spinner-32 bower.json Updating version to February 19, 2014
Octocat-spinner-32 composer.json Updating version to February 19, 2014
Octocat-spinner-32 dataTables.jquery.json Updating version to February 19, 2014
Octocat-spinner-32 license.txt Licensing: DataTables is now available under the MIT license December 11, 2013
Octocat-spinner-32 package.json Updating version to February 19, 2014

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.


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:

<link rel="stylesheet" type="text/css" href="//">

<script type="text/javascript" language="javascript" src="//"></script>
<script type="text/javascript" language="javascript" src="//"></script>


In its simplest case, DataTables can be initialised with a single line of Javascript:


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.


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 for DataTables is available through the DataTables forums and commercial support options are available.


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 /*!.

Something went wrong with that request. Please try again.