@@include('../layouts/head-page-meta.html', {'title': 'Basic Initialization'}) @@include('../layouts/head-css.html')
@@include('../layouts/layout-vertical.html')
@@include('../layouts/breadcrumb.html', {'breadcrumb-item': 'DataTable', 'breadcrumb-item-active': 'Basic Int.'})

##### Zero Configuration

DataTables has most features enabled by default, so all you need to do to use it with your own tables is to call the construction function.

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Name | Position | Office | Age | Start date | Salary

##### Default Ordering

With DataTables you can alter the ordering characteristics of the table at initialization time. Using the order initialization parameter

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

##### Multi-Column Ordering

DataTables allows ordering by multiple columns at the same time, which can be activated in a number of different ways

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

##### Complex Headers

When using tables to display data, you will often wish to display column information in groups. DataTables fully supports colspan and rowspan in the table's header

Name | HR Information | Contact
--- | --- | ---
Position | Salary | Office | Extn. | E-mail
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Salary | Office | Extn. | E-mail

##### DOM Positioning

When customizing DataTables for your own usage, you might find that the default position of the feature elements (filter input etc) is not quite to your liking

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Salary | Office | Extn. | E-mail

##### Alternative Pagination

The default page control presented by DataTables (forward and backward buttons with up to 7 page numbers in-between) is fine for most situations, but there are cases where you may wish to customizing the options presented to the end user.

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

##### Scroll - Vertical

This example shows the DataTables table body scrolling in the vertical direction. This can generally be seen as an alternative method to pagination for displaying a large table in a fairly small vertical area.

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

##### Scroll - Vertical, Dynamic Height

This example shows a vertically scrolling DataTable that makes use of the CSS3 vh unit in order to dynamically resize the viewport based on the browser window height

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

##### Language - Comma Decimal Place

A dot (.) is used to mark the decimal place in Javascript, however, many parts of the world use a comma (,) and other characters such as the Unicode decimal separator (⎖) or a dash (-) are often used to show the decimal place in a displayed number.

Name | Position | Office | Age | Start date | Salary
--- | --- | --- | --- | --- | ---
Quinn Flynn | System Architect | Edinburgh | 61 | 2011/04/25 | $320,800
Garrett Winters | Accountant | Tokyo | 63 | 2011/07/25 | $170,750
Ashton Cox | Junior Technical Author | San Francisco | 66 | 2009/01/12 | $86,000
Cedric Kelly | Senior Javascript Developer | Edinburgh | 22 | 2012/03/29 | $433,060
Airi Satou | Accountant | Tokyo | 33 | 2008/11/28 | $162,700
Brielle Williamson | Integration Specialist | New York | 61 | 2012/12/02 | $372,000
Herrod Chandler | Sales Assistant | San Francisco | 59 | 2012/08/06 | $137,500
Rhona Davidson | Integration Specialist | Tokyo | 55 | 2010/10/14 | $327,900
Colleen Hurst | Javascript Developer | San Francisco | 39 | 2009/09/15 | $205,500
Sonya Frost | Software Engineer | Edinburgh | 23 | 2008/12/13 | $103,600
Jena Gaines | Office Manager | London | 30 | 2008/12/19 | $90,560
Quinn Flynn | Support Lead | Edinburgh | 22 | 2013/03/03 | $342,000
Charde Marshall | Regional Director | San Francisco | 36 | 2008/10/16 | $470,600
Haley Kennedy | Senior Marketing Designer | London | 43 | 2012/12/18 | $313,500
Tatyana Fitzpatrick | Regional Director | London | 19 | 2010/03/17 | $385,750
Michael Silva | Marketing Designer | London | 66 | 2012/11/27 | $198,500
Paul Byrd | Chief Financial Officer (CFO) | New York | 64 | 2010/06/09 | $725,000
Gloria Little | Systems Administrator | New York | 59 | 2009/04/10 | $237,500
Bradley Greer | Software Engineer | London | 41 | 2012/10/13 | $132,000
Dai Rios | Personnel Lead | Edinburgh | 35 | 2012/09/26 | $217,500
Name | Position | Office | Age | Start date | Salary

@@include('../layouts/footer-block.html') @@include('../layouts/footer-js.html') @@include('../layouts/customizer.html')