diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 102fabed..3023a24c 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -67abd45d6995d914a0f4c6eb06f9ec1c4f8035dd +8f9daac0fedf3de08b191c663e2ccbcccdb6ae44 diff --git a/composer.json b/composer.json index d4b1cb17..ae0b450a 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "datatables/datatables", - "version": "1.10.21-dev", + "version": "1.10.21", "description": "DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.", "homepage": "http://www.datatables.net/", "author": "SpryMedia", diff --git a/dataTables.jquery.json b/dataTables.jquery.json index 836843da..efd81803 100644 --- a/dataTables.jquery.json +++ b/dataTables.jquery.json @@ -1,6 +1,6 @@ { "name": "DataTables", - "version": "1.10.21-dev", + "version": "1.10.21", "description": "DataTables enhances HTML tables with the ability to sort, filter and page the data in the table very easily. It provides a comprehensive API and set of configuration options, allowing you to consume data from virtually any data source.", "homepage": "http://datatables.net/", "docs": "http://datatables.net/", diff --git a/examples/advanced_init/column_render.html b/examples/advanced_init/column_render.html index 386527e6..4c02f0ed 100644 --- a/examples/advanced_init/column_render.html +++ b/examples/advanced_init/column_render.html @@ -3,7 +3,7 @@
- +Name | @@ -63,6 +63,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -251,7 +261,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -307,7 +317,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -521,16 +531,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Complex headers (using colspan
/ rowspan
) can be used to group columns of similar information in DataTables, creating a very powerful
visual effect.
In addition to the basic behaviour, DataTables can also take colspan
and rowspan
into account when working with hidden columns. The
+
In addition to the basic behaviour, DataTables can also take colspan
and rowspan
s into account when working with hidden columns. The
colspan
and rowspan
attributes for each cell are automatically calculated and rendered on the page for you. This allows the columns.visible
option and column().visible()
method to take into account
@@ -47,7 +47,7 @@ $(document).ready(function() {
The example below shows a header spanning multiple cells over the contact information, with one of the columns that the span covers being hidden.
Name | @@ -62,6 +62,16 @@ $(document).ready(function() {|||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Salary | +Office | +Extn. | +|||
Tiger Nixon | @@ -251,7 +261,7 @@ $(document).ready(function() {Doris Wilder | Sales Assistant | $85,600 | -Sydney | +Sidney | 3023 | d.wilder@datatables.net | Michelle House | Integration Specialist | $95,400 | -Sydney | +Sidney | 2769 | m.house@datatables.net | @@ -520,16 +530,6 @@ $(document).ready(function() {d.snider@datatables.net | - -
Name | -Position | -Salary | -Office | -Extn. | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows the searching and ordering features of DataTables being disabled by default, which is reflected in the table when it is initialised.
-Name | @@ -54,6 +54,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -242,7 +252,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -298,7 +308,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -512,16 +522,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
t
)
should be included only once).
- This is shown in the demo below where the four key built-in features are duplicated above and below the table.
+This is shown in the demo below where for four key build-in features are duplicated above and below the table.
-Name | @@ -60,6 +60,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -248,7 +258,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -304,7 +314,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -518,16 +528,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -64,6 +64,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -252,7 +262,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -308,7 +318,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -522,16 +532,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -64,6 +64,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -252,7 +262,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -308,7 +318,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -522,16 +532,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
alert
message in this case.
- Name | @@ -54,6 +54,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -242,7 +252,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -298,7 +308,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -512,16 +522,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
First name | @@ -85,6 +85,12 @@ $(document).ready(function() {Salary | |||||
---|---|---|---|---|---|---|
Total: | ++ | |||||
Tiger | @@ -251,7 +257,7 @@ $(document).ready(function() {Doris | Wilder | Sales Assistant | -Sydney | +Sidney | $85,600 |
Michelle | House | Integration Specialist | -Sydney | +Sidney | $95,400 | |
$112,000 | ||||||
Total: | -- |
In addition to the above code, the following Javascript library files are loaded for use in this example:
data-sort
/ data-order
attribute is set on the column with plain numeric data.
- Name | @@ -57,6 +57,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
T. Nixon | @@ -245,7 +255,7 @@ $(document).ready(function() {|||||||
D. Wilder | Sales Assistant | -Sydney | +Sidney | 23 | Mon 20th Sep 10 | $85,600/y | @@ -301,7 +311,7 @@ $(document).ready(function() {|
M. House | Integration Specialist | -Sydney | +Sidney | 37 | Thu 2nd Jun 11 | $95,400/y | @@ -515,16 +525,6 @@ $(document).ready(function() {$112,000/y |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
As of DataTables 1.10.5 it is now possible to define initialisation options using HTML5 data-*
attributes. The attribute names are read by DataTables and used, potentially in combination with, the standard Javascript initialisation options (with the
data-*
attributes taking priority).
Please note that the attribute values must contain valid JSON data or a Javascript primitive, as required by jQuery's $().data()
method. This means that double quotes should be used inside the attribute if needed
- for a string (see the data-order
in this example).
Please note that the attribute values must contain valid JSON data or a Javascript primitive (as require by jQuery's $().data()
method - this means that double quotes should be used inside the attribute if needed
+ for a string (see the data-order
example below).
Additionally, jQuery will convert a dashed string into the camel-case notation used by DataTables for its options. For example data-page-length
is
used to represent pageLength
.
The table below shows the use of In addition to the above code, the following Javascript library files are loaded for use in this example:
The following example shows DataTables reading a German language file which is hosted on the DataTables CDN
-Name | @@ -52,6 +52,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -240,7 +250,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -296,7 +306,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -510,16 +520,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The example below shows a 2D array being used to include a "Show all" records option.
-Name | @@ -54,6 +54,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -242,7 +252,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -298,7 +308,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -512,16 +522,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Please note that this feature requires DataTables 1.10.3 or newer.
-Name | @@ -71,6 +71,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -259,7 +269,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -315,7 +325,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -529,16 +539,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -60,6 +60,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -248,7 +258,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -304,7 +314,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -518,16 +528,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -92,6 +91,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -280,7 +289,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -336,7 +345,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -550,16 +559,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
- var groupColumn = 2;
var table = $('#example').DataTable({
"columnDefs": [
- { "visible": false, "targets": groupColumn }
+ { "visible": false, "targets": 2 }
],
- "order": [[ groupColumn, 'asc' ]],
+ "order": [[ 2, 'asc' ]],
"displayLength": 25,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();
var last=null;
- api.column(groupColumn, {page:'current'} ).data().each( function ( group, i ) {
+ api.column(2, {page:'current'} ).data().each( function ( group, i ) {
if ( last !== group ) {
$(rows).eq( i ).before(
'<tr class="group"><td colspan="5">'+group+'</td></tr>'
@@ -598,18 +596,18 @@ $(document).ready(function() {
// Order by the grouping
$('#example tbody').on( 'click', 'tr.group', function () {
var currentOrder = table.order()[0];
- if ( currentOrder[0] === groupColumn && currentOrder[1] === 'asc' ) {
- table.order( [ groupColumn, 'desc' ] ).draw();
+ if ( currentOrder[0] === 2 && currentOrder[1] === 'asc' ) {
+ table.order( [ 2, 'desc' ] ).draw();
}
else {
- table.order( [ groupColumn, 'asc' ] ).draw();
+ table.order( [ 2, 'asc' ] ).draw();
}
} );
} );
In addition to the above code, the following Javascript library files are loaded for use in this example:
It's worth noting that I don't have a good use case for when you might what to mix such complex ordering behaviour into a single table, but the example shows - how these options can be used and therefore applied across all columns.
+ how these options can be use and therefore applied across all columns.Name | @@ -67,6 +67,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -255,7 +265,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -311,7 +321,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -525,16 +535,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -107,7 +107,7 @@ $(document).ready(function() {
---|
Name | @@ -92,7 +92,7 @@ $(document).ready(function() {
---|
Name | @@ -111,7 +111,7 @@ $(document).ready(function() {
---|
Name | @@ -82,7 +82,7 @@ $(document).ready(function() {
---|
Name | @@ -110,7 +110,7 @@ $(document).ready(function() {
---|
Name | @@ -105,7 +105,7 @@ $(document).ready(function() {
---|
Name | @@ -119,7 +119,7 @@ $(document).ready(function() {
---|
Name | @@ -113,7 +113,7 @@ $(document).ready(function() {
---|
Name | @@ -92,7 +92,7 @@ $(document).ready(function() {
---|
Column 1 | @@ -112,7 +112,7 @@ $(document).ready(function() {
---|
Name | @@ -61,6 +61,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -249,7 +259,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -305,7 +315,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -519,16 +529,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Highly-interactive tables often require a 'counter' column that contains the position for each row in the table. This column should not be sortable, and will +
Highly-interactive tables often require a 'counter' column that contains the position in the table for each row. This column should not be sortable, and will change dynamically as the ordering and searching applied to the table is altered by the end user.
This example shows how this can be achieved with DataTables, where the first column is the counter column, and is updated when ordering or searching occurs.
This is done by listening for the order
and column() method to get the nodes in the current order and with the currently applied filter.
@@ -65,6 +65,16 @@ $(document).ready(function() { | Salary | ||||||
---|---|---|---|---|---|---|---|
+ | Name | +Position | +Office | +Age | +Salary | +||
@@ -254,7 +264,7 @@ $(document).ready(function() { | Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | $85,600 | Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | $95,400 | @@ -523,16 +533,6 @@ $(document).ready(function() {$112,000 | - -
- | Name | -Position | -Office | -Age | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -66,6 +61,14 @@ $(document).ready(function() {Office | ||
---|---|---|---|
Name | +Age | +Position | +Office | +
Tiger Nixon | @@ -1322,14 +1325,6 @@ $(document).ready(function() {|||
Name | -Age | -Position | -Office | -
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
- var table = $('#example').DataTable({
- columnDefs: [{
- orderable: false,
- targets: [1,2,3]
- }]
- });
+ var table = $('#example').DataTable();
$('button').click( function() {
var data = table.$('input, select').serialize();
@@ -1360,7 +1350,7 @@ $(document).ready(function() {
In addition to the above code, the following Javascript library files are loaded for use in this example:
-
- https://code.jquery.com/jquery-3.3.1.js
+ //code.jquery.com/jquery-1.12.4.js
-
../../media/js/jquery.dataTables.js
@@ -1555,7 +1545,7 @@ $(document).ready(function() {
Material Design (Tech. preview)
-
- UIKit 3 (Tech. preview)
+ UIKit (Tech. preview)
Highlighting rows and columns can be useful for drawing attention to where the user's cursor is in a table, particularly if you have a lot of narrow columns. - Highlighting a row is easy using CSS, but for column highlighting, you need to use a little bit of Javascript.
-This example shows DataTables making use of the Highlighting rows and columns have be quite useful for drawing attention to where the user's cursor is in a table, particularly if you have a lot of narrow
+ columns. Of course the highlighting of a row is easy enough using CSS, but for column highlighting, you need to use a little bit of Javascript.
This example shows that in action on DataTable by making use of the cell().index()
method to get the index of the column that is to be operated on, and then the cells().nodes()
and column().nodes()
methods to remove old classes and
apply the new highlighted class, respectively.
Name | @@ -64,6 +64,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -252,7 +262,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -308,7 +318,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -522,16 +532,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The searching functionality provided by DataTables is useful for quickly search through the information in the table - however the search is global, and you may - wish to present controls that search on specific columns.
+The searching functionality that is provided by DataTables is very useful for quickly search through the information in the table - however the search is + global, and you may wish to present controls to search on specific columns only.
DataTables has the ability to apply searching to a specific column through the column().search()
method (note that the name of the method is search
not filter
, since column().search() method (note that the name of the method is search
not filter
since filter()
is used to apply a filter to a result set).
The column searches are cumulative, so you can apply multiple individual column searches, in addition to the global search, allowing complex searching options to be presented to the user.
@@ -69,7 +69,7 @@ $(document).ready(function() { "DataTables API method">column() method takes into account any hidden columns when selecting the column to act upon.Name | @@ -80,6 +80,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -268,7 +278,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -324,7 +334,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -538,16 +548,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example is almost identical to text based individual column example and provides the same functionality, but in this case using select
input controls.
After the table is initialised, the API is used to build the select
inputs through the use of columns().every()
to loop over the columns (the
- columns()
selector can also be used to limit the
- selected columns if required), then the column().data()
method is used to get the data for each column in turn. The helper methods unique()
and After the table is initialised, the API is used to build the select
inputs through the use of the column().data()
method to get the data for each column
+ in turn. The helper methods unique()
and sort()
are also used to reduce the data for set input to unique
and ordered elements. Finally the change
event from the select
input is used to trigger a column search
using the column().search()
method.
Note that the column().search()
method in
- this particular case performs an exact match through the use of a custom regular expression and disabling DataTables built-in smart searching. For more information
- on the search options in DataTables API, please refer to the documentation for
, search()
column().search()
and $.fn.dataTable.util.escapeRegex()
which are used for searching globally, by column and escaping regular expressions
respectively.
Also note this example demonstrates the use of initComplete
, a callback function triggered when the table has fully loaded. Use of this callback isn't required in
- this example since the data is available in the table on load, but in the case of Ajax loaded data, Note also that this example shows the use of initComplete
a callback function that is triggered when the table has fully loaded. Use of this callback isn't
+ actually required in this example since the data is available in the table on load, but in the case of Ajax loaded data, initComplete
is useful to execute code
after the data has been loaded.
Name | @@ -87,6 +84,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -275,7 +282,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -331,7 +338,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -545,16 +552,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -132,6 +132,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -320,7 +330,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -376,7 +386,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -590,16 +600,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The DataTables API has a number of methods for attaching child rows to a parent row in the DataTable. This can be used to show additional information - about a row, useful for cases where you wish to convey more information about a row than there is space for in the host table.
+The DataTables API has a number of methods available for attaching child rows to a parent row in the DataTable. This can be used to show additional + information about a row, useful for cases where you wish to convey more information about a row than there is space for in the host table.
The example below makes use of the row().child
- methods to first check if a row is already displayed, and if so hide it (
), otherwise show it (row().child.hide()
row().child.show()
). The content of the child row in this example is defined by the format()
function, but you
- would replace that with whatever content you wanted to show, possibly including, for example, an Ajax call to
- the server to obtain any extra information.
formatDetails()
function, but
+ you would replace that with whatever you wanted to show the content required, possibly including, for example, an Ajax call to the server to obtain the extra
+ information to show.
@@ -185,7 +185,7 @@ $(document).ready(function() { |
---|
Name | @@ -59,6 +59,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -247,7 +257,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -303,7 +313,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -517,16 +527,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example modifies the multiple row selection example by only allowing the selection of a single row. This is done by checking to see if the row already has - a selected class, and if so removing it, but if not then the class is removed from all other rows in the table and then applied to the row being selected.
+This example shows a modification of the multiple row selection example, where just a single can now be selected. This is done simply by checking to see if the + row already has a selected class or not, and if so removing it, if not then the class is removed from any other row in the table which does have it and applied to + the row to be selected.
Also shown is the row().remove()
method which
- deletes a row from a table, and the draw()
method with
- false
as its first parameter. This will redraw the table keeping the current paging (without the false
parameter the paging would be
+ will delete a row from a table, and the draw()
method
+ with false
as its first parameter. This will redraw the table keeping the current paging (without the false
parameter the paging would be
reset to the first page).
If you are looking for a more complete and easier to use row selection option, the Select extension provides - an API that is fully integrated with DataTables for selecting rows and acting upon that selection.
+If you are looking for a more complete and easier to use row selection option, check out the Select extension + provides an API that is fully integrated with DataTables for selecting rows and acting upon those selected rows.
Name | @@ -67,6 +68,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -255,7 +266,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -311,7 +322,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -525,16 +536,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows how you can make use of the column().visible()
API method to dynamically show and hide columns in a table. Also included here is scrolling, just to show it
- enabled with this API method, although it's not required for the API function to work.
In addition, groups of columns can be shown and hidden at the same time using the In addition to this, groups of columns can be shown and hidden at the same time using the If you are looking for a more complete column visibility interaction controls, the Buttons extension for
- DataTables provides a comprehensive module for column visibility control. If you are looking for a more complete column visibility interaction controls, check out the Buttons extension
+ for DataTables provides a comprehensive module for column visibility control.columns()
method to select multiple columns and then using the
+ columns()
method to select multiple columns and then using the columns().visible()
method to set their state.
Name | @@ -70,6 +70,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -258,7 +268,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -314,7 +324,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -528,16 +538,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
In addition to the above code, the following Javascript library files are loaded for use in this example:
The following CSS library files are loaded for use in this example to provide the styling of the table:
full_numbers
- 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbersfirst_last_numbers
- 'First' and 'Last' buttons, plus page numbersThe language strings of 'First', 'Previous' etc can be optionally changed through the internationalisation options of DataTables; The language strings of 'First', 'Previous' etc can be optionally through the internationalisation options of DataTables; language.paginate.first
,
language.paginate.previous
etc.
The example below shows the full_numbers
type of pagination.
Name | @@ -62,6 +62,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -250,7 +260,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -306,7 +316,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -520,16 +530,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The example below shows a comma being used as the decimal place in the currency numbers shown in the final column.
-Name | @@ -58,6 +58,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -246,7 +256,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85.600,00 | @@ -302,7 +312,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95.400,00 | @@ -516,16 +526,6 @@ $(document).ready(function() {$112.000,00 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The example shown below has two sets of grouped information, grouped by colspan in the header.
-Name | @@ -51,6 +51,16 @@ $(document).ready(function() {|||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Salary | +Office | +Extn. | +|||
Tiger Nixon | @@ -240,7 +250,7 @@ $(document).ready(function() {Doris Wilder | Sales Assistant | $85,600 | -Sydney | +Sidney | 3023 | d.wilder@datatables.net | Michelle House | Integration Specialist | $95,400 | -Sydney | +Sidney | 2769 | m.house@datatables.net | @@ -509,16 +519,6 @@ $(document).ready(function() {d.snider@datatables.net | - -
Name | -Position | -Salary | -Office | -Extn. | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
div
.
- Name | @@ -96,6 +96,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -284,7 +294,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -340,7 +350,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -554,16 +564,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Disabling features that you don't wish to use for a particular table is easily done by setting a variable in the initialisation object. The full list of - available options is available in the DataTables reference.
+Disabling features that you don't wish to use for a particular table is easily done by setting a variable in the initialisation object. A full list of the + options that can be used is available in the DataTables reference.
In the following example only the search feature is left enabled (which it is by default).
Name | @@ -48,6 +48,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -236,7 +246,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -292,7 +302,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -506,16 +516,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
width
attribute to the HTML table tag or inline width style (style="width:100%"
), it will be used as the width for the table (overruling any CSS
styles).
- This example shows a table with width="80%"
and the container is also flexible width, so as the window is resized, the table will also resize
+
This example shows a table with width="100%"
and the container is also flexible width, so as the window is resized, the table will also resize
dynamically.
Name | @@ -51,6 +51,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -239,7 +249,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -295,7 +305,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -509,16 +519,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
In the table below both the office and age version columns have been hidden, the former is not searchable, the latter is.
-Name | @@ -62,6 +62,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -250,7 +260,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -306,7 +316,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -520,16 +530,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
DataTables is a simple-to-use jQuery plug-in with a huge range of customisable options. The examples in this section demonstrate basic initialisation of +
DataTables is very simple to use as a jQuery plug-in with a huge range of customisable option. The examples in this section demonstrate basic initialisation of DataTables and how it can be easily customised by passing an object with the options you want.
Changing the language information displayed by DataTables is as simple as passing in a language
object to the DataTable constructor.
This example shows a different set of English string being used, rather than the defaults.
+The example above shows a different set of English string being used, rather than the defaults.
Name | @@ -52,6 +52,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -240,7 +250,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -296,7 +306,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -510,16 +520,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
First name | @@ -234,7 +234,7 @@ $(document).ready(function() {Doris | Wilder | Sales Assistant | -Sydney | +Sidney | $85,600 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Michelle | House | Integration Specialist | -Sydney | +Sidney | $95,400 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name | @@ -51,6 +51,15 @@ $(document).ready(function() {Salary | |||
---|---|---|---|---|
Name | +Position | +Office | +Age | +Salary | +
Tiger Nixon | @@ -116,17 +125,8 @@ $(document).ready(function() {$183,000 | |||
Name | -Position | -Office | -Age | -Salary | -
Name | @@ -136,6 +136,15 @@ $(document).ready(function() {Salary | |||
---|---|---|---|---|
Name | +Position | +Office | +Age | +Salary | +
Jena Gaines | @@ -222,15 +231,6 @@ $(document).ready(function() {$103,500 | |||
Name | -Position | -Office | -Age | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
First name | @@ -315,7 +315,7 @@ $(document).ready(function() {Doris | Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -392,7 +392,7 @@ $(document).ready(function() {Michelle | House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -704,7 +704,7 @@ $(document).ready(function() {
---|
First name | @@ -312,7 +312,7 @@ $(document).ready(function() {Doris | Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -389,7 +389,7 @@ $(document).ready(function() {Michelle | House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -702,7 +702,7 @@ $(document).ready(function() {
---|
Name | @@ -55,6 +55,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -243,7 +253,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -299,7 +309,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -513,16 +523,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
vh
unit and all other evergreen browsers.
- Name | @@ -51,6 +51,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -239,7 +249,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -295,7 +305,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -509,16 +519,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -56,6 +56,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -244,7 +254,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -300,7 +310,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -514,16 +524,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The table below is ordered (descending) by the Age column.
-Name | @@ -51,6 +51,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -239,7 +249,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -295,7 +305,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -509,16 +519,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Searching, ordering and paging goodness will be immediately added to the table, as shown in this example.
-Name | @@ -46,6 +46,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -234,7 +244,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -290,7 +300,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -504,16 +514,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
columns.data
option ).
- Name | @@ -81,7 +81,7 @@ $(document).ready(function() {
---|
Name | @@ -47,6 +47,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -235,7 +245,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -291,7 +301,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -505,16 +515,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Which of these options is used to populate the table data depends upon how the table is initialised. The examples in this section show these four different data - source types.
+Which of these options is used to populate the table with data depends upon how the table is initialised. The examples in this section show these four different + data source types.
diff --git a/examples/data_sources/js_array.html b/examples/data_sources/js_array.html index bfdd82b3..f0660acb 100644 --- a/examples/data_sources/js_array.html +++ b/examples/data_sources/js_array.html @@ -3,7 +3,7 @@ - +In addition to the above code, the following Javascript library files are loaded for use in this example:
First name | @@ -84,7 +84,7 @@ $(document).ready(function() {
---|
Name | @@ -73,6 +73,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -261,7 +271,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -317,7 +327,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -531,16 +541,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows how you can use information available in the DOM to order columns. Typically DataTables will read information to be ordered during its +
This example shows how you can use information available in the DOM to order columns. Typically DataTables will read information to be ordered during it's initialisation phase, and this will not be updated based on user interaction, so ordering on columns which have, for example, form elements in them, may not reflect the current value of the input. To overcome this problem, you must update the data that DataTables will order on, just prior to the order. This method is much more efficient than actually ordering using the DOM, since only one DOM query is needed for each cell to be ordered.
-The example below shows the first column as normal text with ordering as you would expect. The following columns all have a form input element of different +
The example below shows the first two columns as normal text with ordering as you would expect. The following columns all have a form input element of different kinds, and the information contained within is what DataTables will perform the order on, based on the value at the time of the order.
-This is a fairly simple example, but you aren't constrained to just using form input elements, you could use anything and customise your DOM queries to suit
- yourself. You could also update the ordering live as a user enters data into a form by using an event handler calling This is a fairly simple example, but it you aren't constrained to just using form input elements, you could use anything and customise your DOM queries to suit
+ yourself. You could also update the ordering live as a user in entered data into a form using an event handler calling order()
or draw()
methods.
Name | @@ -91,6 +91,14 @@ $(document).ready(function() {Office | ||
---|---|---|---|
Name | +Age | +Position | +Office | +
Tiger Nixon | @@ -1347,14 +1355,6 @@ $(document).ready(function() {|||
Name | -Age | -Position | -Office | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
There may be occasions when you wish to search data presented to the end user in your own manner, common examples are number range searches (in between two
- numbers) and date range searches. DataTables provides an API method to add your own search functions, $.fn.dataTable.ext.search
. This is an array of
+
There may be occasions when you wish to search data presented to the end user in your own manner, common examples are number range search (in between two
+ numbers) and date range search. DataTables provide an API method to add your own search functions, $.fn.dataTable.ext.search
. This is an array of
functions (push your own onto it) which will will be run at table draw time to see if a particular row should be included or not.
This example shows a search being performed on the age column in the data, based upon two inputs.
Name | @@ -81,6 +81,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -269,7 +279,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -325,7 +335,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -539,16 +549,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Although DataTables will automatically order data from a number of different data types using the built in methods, when dealing with more complex formatted - data, it can be desirable to define the ordering order yourself. Using plug-in ordering functions, you can have DataTables sort data in any manner you wish.
+Although DataTables will automatically order data from a number of different data types using the built in methods, When dealing with more complex formatted + data, it can be desirable to define the ordering order yourself. Using plug-in ordering functions, you have have DataTables sort data in any manner you wish.
Formatted data of a particular kind can be automatically detected and a suitable ordering plug-in assigned to it by making use of DataTables' plug-in type - detection abilities. For more information about ordering plug-ins, creating them and their requirements, please refer to the plug-in development documentation.
+ detection abilities. For complete information about type detection and ordering plug-ins; creating them and their requirements, please refer to the plug-in + development documentation.This example shows ordering with using an enumerated type.
A wide variety of ready made ordering plug-ins can be found on the DataTables plug-ins page.
Name | @@ -67,6 +68,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -255,7 +266,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | Low | @@ -311,7 +322,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | Low | @@ -525,16 +536,6 @@ $(document).ready(function() {Low |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Although DataTables will order a number of data types using the built in methods, when dealing with more complex formatted data, it can be desirable to define - the ordering order yourself. Using plug-in ordering functions, you can have DataTables order data in any manner you wish.
+Although DataTables will order a number of data types using the built in methods, When dealing with more complex formatted data, it can be desirable to define + the ordering order yourself. Using plug-in ordering functions, you have have DataTables order data in any manner you wish.
This is done by using the columns.type
parameter, in combination with a ordering plug-in. The ordering plug-in can be of any level of
+ "DataTables initialisation option">columns.type parameter, in combination with a ordering plug-in. The ordering plug-in can be be of any level of
complexity (natural ordering for example can be fairly complex while also very powerful), and is defined by attaching to the
- $.fn.dataTable.ext.type.order
object. For more information about ordering plug-ins, creating them and their requirements, please refer to the plug-in
+ $.fn.dataTable.ext.type.order
object. For more information about ordering plug-ins; creating them and their requirements, please refer to the plug-in
development documentation.
This example shows ordering with using an enumerated type.
A wide variety of ready made ordering plug-ins can be found on the DataTables plug-ins page.
Name | @@ -66,6 +66,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -254,7 +264,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | Low | @@ -310,7 +320,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | Low | @@ -524,16 +534,6 @@ $(document).ready(function() {Low |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
').text( str )
);
@@ -104,7 +94,7 @@ if ( window.$ ) {
}
if ( settings.oFeatures.bServerSide ) {
- if ( typeof settings.ajax === 'function' ) {
+ if ( $.isFunction( settings.ajax ) ) {
return;
}
$.ajax( {
diff --git a/examples/resources/syntax/shCore.css b/examples/resources/syntax/shCore.css
index 0dd26ca9..0788210e 100644
--- a/examples/resources/syntax/shCore.css
+++ b/examples/resources/syntax/shCore.css
@@ -87,15 +87,13 @@
}
.syntaxhighlighter table td.code {
width: 100% !important;
- position: relative !important;
}
.syntaxhighlighter table td.code .container {
position: relative !important;
- overflow: auto !important;
}
.syntaxhighlighter table td.code .container textarea {
box-sizing: border-box !important;
- position: relative !important;
+ position: absolute !important;
left: 0 !important;
top: 0 !important;
width: 100% !important;
@@ -105,18 +103,6 @@
padding-left: 1em !important;
overflow: hidden !important;
white-space: pre !important;
- line-height: 1.4em !important;
-}
-.syntaxhighlighter.source table td.code .container {
- position: absolute !important;
- overflow-x: auto !important;
- top: 0 !important;
- bottom: 0 !important;
- left: 0 !important;
- right: 0 !important;
-}
-.syntaxhighlighter.source table td.code .container div.line {
- display: none !important;
}
.syntaxhighlighter table td.gutter .line {
text-align: right !important;
@@ -404,5 +390,6 @@
.syntaxhighlighter table td.code {
width: auto !important;
+ overflow: auto !important;
}
diff --git a/examples/server_side/custom_vars.html b/examples/server_side/custom_vars.html
index ab4361b3..cc3bfa6c 100644
--- a/examples/server_side/custom_vars.html
+++ b/examples/server_side/custom_vars.html
@@ -3,7 +3,7 @@
-
+
First name | @@ -99,7 +99,7 @@ $(document).ready(function() {
---|
First name | @@ -56,6 +56,16 @@ $(document).ready(function() {Salary | ||||
---|---|---|---|---|---|
First name | +Last name | +Position | +Office | +Start date | +Salary | +
Airi | Satou | @@ -136,16 +146,6 @@ $(document).ready(function() {29th Mar 12 | $433,060 | ||
First name | -Last name | -Position | -Office | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example below shows DT_RowId
being used to add information to the table. In addition objects are used as the data source for the rows.
First name | @@ -98,7 +98,7 @@ $(document).ready(function() {
---|
First name | @@ -91,7 +91,7 @@ $(document).ready(function() {
---|
First name | @@ -97,7 +97,7 @@ $(document).ready(function() {
---|
First name | @@ -262,7 +262,7 @@ $.fn.dataTable.pipeline = function ( opts ) { request.length = requestLength*conf.pages; // Provide the same `data` options as DataTables. - if ( typeof conf.data === 'function' ) { + if ( $.isFunction ( conf.data ) ) { // As a function it is executed with the data object as an arg // for manipulation. If an object is returned, it is used as the // data object to submit @@ -276,7 +276,7 @@ $.fn.dataTable.pipeline = function ( opts ) { $.extend( request, conf.data ); } - return $.ajax( { + settings.jqXHR = $.ajax( { "type": conf.method, "url": conf.url, "data": request, @@ -332,7 +332,7 @@ $(document).ready(function() {
---|
First name | @@ -107,7 +107,7 @@ $(document).ready(function() {
---|
@@ -201,7 +201,7 @@ $(document).ready(function() { |
---|
First name | @@ -124,7 +124,7 @@ $(document).ready(function() {
---|
First name | @@ -83,7 +83,7 @@ $(document).ready(function() {
---|
Name | @@ -49,6 +49,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -237,7 +247,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -293,7 +303,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -507,16 +517,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The following CSS library files are loaded for use in this example to provide the styling of the table:
As with Bootstrap 3, DataTables can also be integrated seamlessly with Bootstrap 4. This integration is done simply by including the DataTables Bootstrap 4 - files (CSS and JS) which sets the defaults needed for DataTables to be initialised as normal, as shown in this example.
+ files (CSS and JS) which will set the defaults needed for DataTables to be initialised as normal, as shown in this examples.Name | @@ -45,6 +45,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -233,7 +243,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -289,7 +299,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -503,16 +513,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows DataTables with just the cell-border
class specified, giving a strong delineation between individual cells.
Name | @@ -42,6 +42,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -230,7 +240,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -286,7 +296,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -500,16 +510,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The compact
class reduces the amount of white-space in the default styling, increasing the information density on screen, as shown below.
The compact
class is used to reduce the amount of white-space the default styling for the DataTable uses, increasing the information density on
+ screen, as shown below.
Name | @@ -42,6 +43,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -230,7 +241,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -286,7 +297,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -500,16 +511,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -54,6 +54,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -242,7 +252,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -298,7 +308,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -512,16 +522,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
DataTables' Foundation integration also provides a renderer for the pagination control in DataTables to ensure that the pagination of the table is also styled consistently by Foundation.
-This integration is done simply by including the DataTables Foundation files (CSS and JS) which sets the defaults needed for DataTables to be initialised as - normal, as shown in this example.
+This integration is done simply by including the DataTables Foundation files (CSS and JS) which will set the defaults needed for DataTables to be initialised as + normal, as shown in this examples.
-Name | @@ -49,6 +49,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -237,7 +247,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -293,7 +303,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -507,16 +517,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows DataTables with just the hover
class specified. This class instructs DataTables' styling to highlight a row when the mouse is
- hovered over it.
This example shows DataTables with just the hover
class specified. This class will instruct DataTables' styling to highlight a row when the mouse
+ is hovered over it.
Name | @@ -43,6 +43,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -231,7 +241,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -287,7 +297,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -501,16 +511,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
Name | @@ -48,6 +48,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -236,7 +246,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -292,7 +302,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -506,16 +516,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The following CSS library files are loaded for use in this example to provide the styling of the table:
Name | @@ -56,6 +55,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -244,7 +253,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -300,7 +309,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -514,16 +523,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
The Javascript shown below is used to initialise the table shown in this example:
$(document).ready(function() {
$('#example').DataTable( {
- autoWidth: false,
columnDefs: [
{
- targets: ['_all'],
- className: 'mdc-data-table__cell'
+ targets: [ 0, 1, 2 ],
+ className: 'mdl-data-table__cell--non-numeric'
}
]
} );
@@ -548,7 +546,7 @@ $(document).ready(function() {
In addition to the above code, the following Javascript library files are loaded for use in this example:
-
- https://code.jquery.com/jquery-3.3.1.js
+ //code.jquery.com/jquery-1.12.4.js
-
../../media/js/jquery.dataTables.js
@@ -570,7 +568,7 @@ $(document).ready(function() {
-
https://cdnjs.cloudflare.com/ajax/libs/material-components-web/4.0.0/material-components-web.min.css
+ "//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.css">//cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.1.0/material.min.css
-
../../media/css/dataTables.material.css
@@ -750,7 +748,7 @@ $(document).ready(function() {
Material Design (Tech. preview)
-
- UIKit 3 (Tech. preview)
+ UIKit (Tech. preview)
This example shows the base DataTables style file being used, with none of the additional feature style classes being used.
-Name | @@ -42,6 +42,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -230,7 +240,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -286,7 +296,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -500,16 +510,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
order-column
(possibly hover
as well), but this example shows just the ordered column highlighting.
- Name | @@ -43,6 +43,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -231,7 +241,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -287,7 +297,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -501,16 +511,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows DataTables with just the row-border
class specified, which can create a pleasing, minimalist, interface for your tables.
Name | @@ -42,6 +42,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -230,7 +240,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -286,7 +296,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -500,16 +510,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows DataTables with just the stripe
class specified.
Name | @@ -42,6 +42,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -230,7 +240,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -286,7 +296,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -500,16 +510,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
This example shows DataTables integrated with UIKit 3.
+This example shows DataTables integrated with UIKit.
The DataTables integration with UIKit is still in development and not all elements might work correctly yet. Only once all of DataTables extensions fully support UIKit will the integration be complete and available via the DataTables download builder.
Name | @@ -46,6 +46,16 @@ $(document).ready(function() {Salary | ||||||
---|---|---|---|---|---|---|---|
Name | +Position | +Office | +Age | +Start date | +Salary | +||
Tiger Nixon | @@ -234,7 +244,7 @@ $(document).ready(function() {|||||||
Doris Wilder | Sales Assistant | -Sydney | +Sidney | 23 | 2010/09/20 | $85,600 | @@ -290,7 +300,7 @@ $(document).ready(function() {|
Michelle House | Integration Specialist | -Sydney | +Sidney | 37 | 2011/06/02 | $95,400 | @@ -504,16 +514,6 @@ $(document).ready(function() {$112,000 |
Name | -Position | -Office | -Age | -Start date | -Salary | -
In addition to the above code, the following Javascript library files are loaded for use in this example:
The following CSS library files are loaded for use in this example to provide the styling of the table: