Compare commits

...

150 Commits

Author SHA1 Message Date
Allan Jardine
fc64e71e1c DataTables 1.10.7 release 2015-04-30 15:08:43 +01:00
Allan Jardine
2f85ace4a1 Fix: IE6/7 could crash completely when using auto width due to a clone of a clone occuring. This was bad for performance anyway and has been rewritten to resolve both the IE crash and performance issue
See thread 27428 for further information
2015-04-30 14:01:55 +01:00
Allan Jardine
bf0b4d0a42 Dev: Don't syntax highlight in IE6/7 as it slows them down hugely 2015-04-30 14:01:36 +01:00
Allan Jardine
5484fdaec3 Fix: For convenience $.fn.dataTable.Api() will now automatically construct a new DataTables API instance (i.e. it is functionality identical to calling new $.fn.dataTable.Api(). This addresses an outstanding todo item and an error in instanceof logic for the exisiting constructor 2015-04-30 14:01:16 +01:00
Allan Jardine
362ec532f2 Dev: Update to jQuery 1.11.3 2015-04-30 14:00:53 +01:00
Allan Jardine
432a0dc18a New: dt-event xhr can now return true to have DataTables not trigger the dt-event error event for cases where you've handled the error yourself now that dt-event xhr is triggered on error as well 2015-04-30 10:02:16 +01:00
Allan Jardine
e4a12ed19d New: Always trigger the dt-event xhr event on completion of an Ajax request, regardless of whether it was successful or in error
New: The jQuery XHR object is passed into the `dt-event xhr` event as the fourth parameter

* This fixes DataTables/DataTables #542
2015-04-29 21:52:34 +01:00
Allan Jardine
8376ac8412 Fix: IE6/7 could crash when loading a DataTable on page load due to the binding of a resize event listener on the window object
* Reported in thread 27428
* This SO thread was helpful: http://stackoverflow.com/questions/1264443
2015-04-29 21:19:40 +01:00
Allan Jardine
8423b06fae Dev: On Bootstrap CSS demo pages don't change the Bootstrap default font 2015-04-29 17:10:34 +01:00
Allan Jardine
2176acf2fb Fix: $.map() expects an array, but a string could be passed in during smart search, which could cause an error with the latest jQuery libraries
This fixes DataTables/DataTables #546
2015-04-29 11:13:38 +01:00
Allan Jardine
b2adfad09c New - API: dt-api i18n() method to provide easy i18n support for developers working on extensions for DataTables and to allow dt-init language to be used as a central point of configuration for the language strings used by the table. 2015-04-29 11:13:16 +01:00
Allan Jardine
0234e9e502 Fix: Singular selectors (dt-api row() for example) did not reduce their result sets to a single item 2015-04-16 12:43:43 +01:00
Allan Jardine
c8b924772d New: External interface to allow the selector options -type selector-modifier object be extended by plug-ins, providing additional selector options. In the first instance this will be used by the new Selector extension that will add the ability to select rows, columns and cells by their selected status.
The main change here is to modify `_selector_run` to loop over the
extension functions (if there are any). This involves passing extra
information to the function (selector type so the correct extension can
be used, settings object and selector modifier to pass on to the
extension method).

The _selector_opts function has also been updated to give the ability to
use unknown properteries through a $.extend, rather than writing a three
property object.
2015-04-16 12:43:24 +01:00
Allan Jardine
b7c5f8c07f New - API: dt-api any() method which can be used to check if the API result set contains any results or not
This is useful for the multi-table aware API as it may contain inner
arrays, which themselves may or may not be empty
2015-04-15 17:05:13 +01:00
Allan Jardine
caa9f2f84b DataTables 1.10.7 development underway 2015-04-15 17:04:55 +01:00
Allan Jardine
de3a4bb72e Fix - CSS: Remove redundant CSS expressions
The specificity of pesudo selectors ranks higher than class selectors,
so `tr:hover` will always rank higher than `tr.odd`. Thus giving
`tr:hover, tr.odd:hover` is redundant and this commit removes that
redundancy.

For more about CSS selector specificity see the MDN documentation:
https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
2015-04-15 17:04:37 +01:00
Allan Jardine
fc8cc9bbd2 Fix - docs: dt-api iterator() was missing parameters (incorrect xml tag)
Dev: Remove comment about using iteratorNew - that was wrong. The
`iterator` method uses a returns parameter now
2015-04-15 17:03:08 +01:00
Allan Jardine
2d6108d00c Fix - docs: dt-api row().child() should have the class name as optional 2015-04-15 17:02:08 +01:00
Allan Jardine
9b539ba8b0 Update: Contributing documentation to direct support requests to the
DataTables forums
2015-04-06 22:08:10 +01:00
Allan Jardine
34abc58d70 Release 1.10.6 2015-04-03 14:47:53 +01:00
Allan Jardine
ba42edc3f1 Fix: If a loaded state does not contain a parameter it could throw an error. This could occur when the stateSave event removed parameters from the state object
This fixes DataTables/DataTables #24
2015-04-03 14:16:57 +01:00
Allan Jardine
acf989695e Fix: $.fn.dataTable.ext.pager.numbers_length was not taken into account when showing ellipsis on both sides of the current number in the paging controller
Fix: Ellipsis elements didn't have padding which could be jarring when shifting between paging that does and doesn't show ellipsis

This fixes DataTables/DataTables #26
2015-04-03 14:16:33 +01:00
Allan Jardine
07bed19ed7 Fix examples: Demo script needs to check for the dt namespace on events triggered by DataTables 2015-04-03 12:22:10 +01:00
Allan Jardine
cbb5a5d6e9 Fix: dt-init row().child() couldn't accept an array of jQuery objects
See https://www.datatables.net/forums/discussion/26441 for details
2015-04-03 12:21:50 +01:00
Allan Jardine
5c919423c1 Fix - docs: dt-api row().child() notes that className is not added to pre-existing node 2015-04-03 12:21:27 +01:00
Allan Jardine
565b639c34 Fix: Scrollbar width wasn't correctly detected in IE9
Fix: Scrollbar width was being calculated everytime requested on machines with zero width scrollbars

The scrollbar width calculation method has been rewritten to use a
single element with use of `offsetWidth` and `clientWidth` to calculate
the scrollbar width. This works all the way back to IE6.
2015-04-03 12:12:15 +01:00
Allan Jardine
e7760542e0 Fix - example: Server-side processing child rows example would throw a JS error if you click on the child row 2015-04-03 10:52:24 +01:00
Allan Jardine
220ae99e08 Updated: Extend currency support to include all top 20 internationally traded currencies. This includes the Russian ruble, South Korean Won, Turkish Lira, India Rupee, Brazilian real, South African rand, Swiss franc, Swedish korona, Norwegian krone and Danish krone.
Any additional currancies should be added as a plug-in, not to the core!

Fixes DataTables/DataTablesSrc #38
2015-04-03 10:45:41 +01:00
Allan Jardine
7c4bf3e3b8 Fix - CSS: compact style could have the column title overlapping the sorting indicator
Fixes DataTables/DataTables #527
2015-04-03 09:51:11 +01:00
Allan Jardine
294a32f8d0 Fix docs: Add reference to dt-init columns.orderSequence from dt-init order 2015-04-03 09:50:06 +01:00
Allan Jardine
e0f2cfd81e Fix: When holding shift and clicking on a single sorted column it was possible to attempt to remove the sort (the internal sorting array was []). This shouldn't be possible, and now isn't.
* This fixes DataTables/DataTables #526
2015-03-31 20:05:23 +01:00
Allan Jardine
1e10603810 Fix: Update numebr render to return the original data point if the data passed in is not a number or a string. This allows dt-init columns.defaultContent to be used. 2015-03-20 10:49:34 +00:00
Allan Jardine
7851a6a204 Fix: If async:false is used in the Ajax configuration, callbacks assigned with dt-api ajax.reload() would not trigger until another draw has been executed.
This was due simply to the code ordering for how the callback is
triggered. See https://www.datatables.net/forums/discussion/26474 for
more information.
2015-03-19 16:20:34 +00:00
Allan Jardine
57596e2ebe Dev: Remove old images that are no longer used (haven't been since 1.9) 2015-03-19 12:00:33 +00:00
Allan Jardine
4ec31cea77 Fix: Update bower.json to not use a glob as it is unclear from the bower spec if this is supported or not and other extensions such as BowerWebpackPlugin do not support it.
Fixes DataTables/DataTables #513
2015-03-19 11:59:50 +00:00
Allan Jardine
79f969ef58 Fix: dt-api $.fn.dataTable.isDataTable() could give incorrect results if a table did not have scrolling enabled 2015-03-18 16:53:25 +00:00
Allan Jardine
2ee5b3e7f6 New: dt-api init() method for plug-in developers to get the initialisation options configured for the DataTable 2015-03-18 16:53:07 +00:00
Allan Jardine
9896d0295d Fix: If the thead contained a table the selector that was looking to find the first row in the table was selected the row from the header table rather than the tbody. This could cause errors such as HTML5 data-* attributes not being detected.
This fixes DataTables/DataTables #508
2015-03-12 10:29:16 +00:00
Allan Jardine
59f2748a7f Dev: Update contributing document to add note about contributions being under the MIT license (explicit concent required) and to acknowledge that DataTables is a large and complex project, so not all PRs can always be accepted. 2015-03-03 21:57:51 +00:00
Allan Jardine
825877f157 New: dt-api rows().every(), dt-api columns().every() and dt-api cells().every() iterator methods to make it easier to perform operations on the table elements. This is done by setting the context of the callback provided to be the singular expression for the table elemtn in question. This basically means you can access the singular methods from this - e.g. this.data() will get the data for the element, this.node() will get the cell when using dt-api cells().every() etc. The exisiting interator methods of dt-api each() and dt-api iterator() remain, and each has its own place for optimial usage of the API, but it is likely that the majority of use will switch to focus on these new methods. The examples in the rest of hte documentation has been updated to reflect this fact. 2015-03-03 15:42:36 +00:00
Allan Jardine
0942fa38a6 Fix: dt-api cells() when given a selector options object in the first parameter was incorrectly applying the selector for the cells. 2015-03-03 15:42:22 +00:00
Allan Jardine
7ef92e4f56 Fix: The initalisation object was being cloned on init which could cause a major performance hit if you pass in a large data set into dt-init data. The table node and internal API reference also should not be cloned.
* Thank you to B Lyon for spotting this issue and writing it up:
  http://www.nowherenearithaca.com/2015/03/avoiding-performance-gotcha-with-jquery.html
2015-03-02 13:25:51 +00:00
Allan Jardine
ba62dcba43 Fix - CSS: Improved interoperability for setting background colour on header cells
Previously the CSS shorthand `background` was used for the background of
the header cells, but this makes it a good deal more difficult to set
the background colour if you want to since `transparent` is implicit in
the shorthand used. This method, although a bit longer in CSS is still
fairly simple and a lot more flexible
2015-02-27 16:29:44 +00:00
Allan Jardine
16c48ad4bf Fix: dt-event xhr was not being emitted when dt-init ajax was being given as a function 2015-02-27 15:12:46 +00:00
Allan Jardine
ee9ca0336e Fix: Scrollbar left detection wasn't allowing for sub-pixel rendering which occurs when browsers are zoomed
* This refers to DataTables/DataTables #479 and DataTables/Scroller #44
2015-02-27 12:00:43 +00:00
Allan Jardine
b1ff92a274 Fix: Error in the detection of style="width:..." attributes. DataTables was reading the pixel value that it had written if the columns were recalculated. Now only percentage values are used from the style width.
* This fixes DataTables/DataTables #501
2015-02-25 10:48:22 +00:00
Allan Jardine
c6be28ef8f Call _fnAjaxDataSrc before setting recordsTotal
_fnAjaxDataSrc will in turn call _fnGetObjectDataFn, which
can be specified by the dataSrc method.

This way the dataSrc can set the recordsTotal parameter on
the json data and the changes will be read into the
recordsTotal/recordsFiltered variables.
2015-02-19 13:38:14 +00:00
Allan Jardine
62da8efbca New: The dt-init ajax.data option, when used as a function, now has the DataTables' settings object passed in as the second parameter, which can be useful to access the API if needed 2015-02-19 13:37:57 +00:00
Allan Jardine
a1458bf80c Fix: Legacy API fnDraw was incorrectly handling the case when false was passed in.
* See DataTables/DataTables #499
2015-02-17 15:00:24 +00:00
Allan Jardine
b433f105a3 Fix: Due to use of an HTML entity, DataTables could fail on XHTML pages 2015-02-17 10:29:09 +00:00
Allan Jardine
5ec5862938 Dev: Fix CSS as a dependency 2015-02-16 16:01:14 +00:00
Allan Jardine
6217b1aaae Merge branch 'master' of github.com:DataTables/DataTablesSrc 2015-02-16 16:00:55 +00:00
Allan Jardine
455121839a Fix docs: dt-init stateSaveCallback syntax error 2015-02-16 16:00:20 +00:00
Allan Jardine
a9b35a4927 Dev: Add ability to set a body class for an example for extra styling information. This will help to combat conflicts with the datatables.net site css when deployed on the site. 2015-02-16 12:01:07 +00:00
Allan Jardine
1ee4427ab0 Dev: JSPM support in package.json 2015-02-16 12:00:46 +00:00
Allan Jardine
3824202e0e Dev: Update CDN libraries for the examples 2015-02-12 14:11:54 +00:00
Allan Jardine
f1b561ec53 Fix: dt-init columns.orderData wasn't working if given as an integer 2015-02-12 14:11:37 +00:00
Allan Jardine
15991a26eb Dev: 1.10.5 version 2015-02-12 14:11:18 +00:00
Allan Jardine
6fbd6a9c46 Dev: Firebase database in example documentation rather than AIR (outdated) 2015-02-12 14:10:38 +00:00
Allan Jardine
a5d77d99bc Sync repos: Add html data options example 2015-02-10 14:27:53 +00:00
Allan Jardine
2c67caad44 Fix: Exit out of the extend API method if possible, for performance 2015-02-10 14:26:37 +00:00
Allan Jardine
34fb1cb18a Dev: Add buttons object to .ext for future buttons extension 2015-02-10 14:25:57 +00:00
Allan Jardine
c98854def4 Fix - example: Dro the http protocol from the i18n CDN file loder example so it works over https 2015-02-10 14:25:16 +00:00
Allan Jardine
d6f46dffbb New: DataTables intialisation options can now be specified using HTML data-* attributes on the HTML <table> tag and on the cells of the column headers in the table.
* A new example of this is included
* Fixes DataTables/DataTablesSrc #9
2015-02-06 16:35:34 +00:00
Allan Jardine
71535def21 Fix examples: Server-side processing examples didn't correctly show the Ajax data after the first draw 2015-02-06 16:35:12 +00:00
Allan Jardine
4039e77a6f Fix: In IE9 where the table is in an iframe paging elements were not added until after the first draw
* See thread 23915 for details and kudos to helenm for the research into the issue
2015-02-04 16:11:59 +00:00
Allan Jardine
8f3ad35944 Merge branch 'master' of github.com:DataTables/DataTablesSrc 2015-02-04 10:56:07 +00:00
Allan Jardine
7a26c5d4c8 Fix: When detecting is the table has a width attribute we can also use style.width to check if a width as been assigned using the style attribute. This doesn't work for reading CSS assigned information, that would require parsing the stylesheet` but it does mean there is a way of doing this with using deprecated attributes. 2015-02-04 10:55:43 +00:00
Allan Jardine
1b8319e9e3 Added images to bower 'main'section 2015-02-04 10:54:57 +00:00
Allan Jardine
71195d29c3 Fix: jQuery UI stylingsheet didn't have all the same options as the main DataTables stylesheet 2015-02-04 10:54:37 +00:00
Allan Jardine
71863bc49f Site: Syntax highlight could line break incorrectly 2015-01-22 10:22:28 +00:00
Allan Jardine
f4f8ca5632 Fix example: Index column API example had a typo
* This fixes DataTables/DataTables #482
2015-01-22 10:22:13 +00:00
Allan Jardine
c7e18c4236 move eq jQuery selector outside of selector 2015-01-22 10:21:30 +00:00
Allan Jardine
d1ea76a958 Fix example: dt-init rowCallback example was highlighting all rows, rather than just a select few due to the logic condition being a bit loose! 2015-01-11 16:27:29 +00:00
Allan Jardine
744155653e New: dt-init ajax.data can return a string to be used as the request body. This is useful for submitting a JSON string to the server.
* This is actually compatible with 1.10.0+ but was never documented (it
  wasn't an intended feature, but rather an implementation detail. It
  is rather useful though, so is now documented.
2015-01-11 16:27:15 +00:00
Allan Jardine
d65dd47fe6 New: where condition controls for the example PHP server-side processing class (SSP). This takes the form of a new complex method (to compliment the exisiting simple method) which accepts where parameters that can be used for either user based filtering, or server based filtering. 2015-01-11 16:26:59 +00:00
Allan Jardine
be061edb7b Dev: Remove accidentally committed debug 2014-12-22 17:14:02 +00:00
Allan Jardine
7c07b80222 New: Improved error handling - $.fn.dataTable.ext.errMode can now be:
* `alert` - Alert the error
 * `throw` - Throw an error
 * `none` - Do nothing
 * A function that is called

New: `dt-event error` event that is triggered when an error occurs (regardless of the value of `$.fn.dataTable.ext.errMode`
2014-12-22 16:15:10 +00:00
Allan Jardine
ff13ccc3ca Update example: Update Ajax language example to read file form the CDN 2014-12-16 15:24:39 +00:00
Allan Jardine
a5e8ca8a2e Dev: Remove unused files from the example resources. Examples use the CDN files now 2014-12-16 15:24:21 +00:00
Allan Jardine
6c7ada53eb Fix: Image file size optimisation.
See DataTables/DataTables #470 for details
2014-12-16 15:24:05 +00:00
Allan Jardine
1c95f9fe06 Dev: Remove debug 2014-12-15 15:46:24 +00:00
Allan Jardine
25ceef46ab Fix: When initialising a table and checking it it already exists, we should check against header and footer elements as well, so they can be used as the selectors
This fixes DataTables/DataTables #467
2014-12-15 15:13:08 +00:00
Allan Jardine
1ac1ea6752 Dev: Support for a "private" examples directory where the examples are
compiled but not included in the ToC

Dev: longer line wrapping!
2014-12-11 15:27:11 +00:00
Allan Jardine
24b2d11460 Dev: Show language name in code highlighting 2014-12-04 12:23:12 +00:00
Allan Jardine
4112da87a2 Dev: Add C# syntax highlighting 2014-12-02 10:38:13 +00:00
Allan Jardine
a5ff36fdb9 Fix example: Row details discription refered to an incorrect function name 2014-12-02 10:37:56 +00:00
Allan Jardine
90ce3773f5 Fix: When detecting HTML5 attributes need to check for null from getAttribute, since otherwise empty strings would fail.
See thread 24802
2014-12-02 10:37:40 +00:00
Allan Jardine
a0d6150c76 Dev: use Google hosts Raleway font for standalone Editor 2014-12-02 10:37:23 +00:00
Allan Jardine
bc256721ce Fix docs: Invalid line to function that doesn't exist 2014-11-28 10:02:22 +00:00
Allan Jardine
31670cc1c5 Fix: dt-api $.fn.dataTable.isDataTable() wasn't working correctly on scrolling tables when the header or footer table was passed in 2014-11-24 10:51:01 +00:00
Allan Jardine
cb957c019e Merge pull request #22 from bjmiller/master
Fix for CommonJS/Browserify
2014-11-18 17:10:50 +00:00
Allan Jardine
cd2423d21a Fix #23: Attach the scroll event for the header alignment using the DT namespace to ensure that it is removed on destroy 2014-11-18 17:10:34 +00:00
Allan Jardine
dd7fbeb0a7 Fix for CommonJS/Browserify
I'm not sure whether this breaks any other CJS implementation, but the only one you're likely to have to worry about is Browserify.

This relates to https://github.com/DataTables/DataTables/issues/434
2014-11-18 17:10:18 +00:00
Allan Jardine
e820e57fec Dev: Daft JSON error in package.json file 2014-11-13 14:14:48 +00:00
Allan Jardine
42f6be43d2 Dev: Update package.json file 2014-11-13 14:11:00 +00:00
Allan Jardine
3a22a082c3 New: DT_RowAttr special parameter for row data to be able to set abstract parameters for the row. This compliments the exisiting DT_RowId, DT_RowClass and DT_RowData parameters.
Thanks to Jifer in thread 24534 for this suggestion
2014-11-12 10:09:17 +00:00
Allan Jardine
d83f47cfb5 Fix: dt-api $.fn.dataTable.util.throttle() was missing the first call.
Dev: Moving on to 1.10.5-dev
2014-11-11 14:14:11 +00:00
Allan Jardine
06c1cbebde DataTables 1.10.4 release 2014-11-07 15:17:44 +00:00
Allan Jardine
9841c3f038 Dev: Fix return case for column visiblity: 2014-11-07 15:17:29 +00:00
Allan Jardine
f4d1495a2c Dev: Tests for the cell invalidation update 2014-11-07 15:17:14 +00:00
Allan Jardine
24761003f3 Fix: dt-api cell().invalidate() and dt-api cells().invalidate() now invalidate only the cell(s) in question and not the whole row.
Previously the whole row was invalidated as a quick workaround for what
I would would be a complex task, but the solution is actually relatively
simple and small in code size, reusing much of the current invalidation
code. The cache data for the whole row is still removed, but the
important part of minimising the DOM interaction is in place.
2014-11-07 12:28:44 +00:00
Allan Jardine
0e0acbd521 Dev: Code type
* Fixes DataTables/DataTables #448
2014-11-05 11:44:05 +00:00
Allan Jardine
fb6a7be880 Fix: Selector errors when using jQuery selectors with dt-init deferRender enabled
Fix: Incorrect returns from sub-methods if a selector does not contain any results (DataTables/DataTables #431)
Update: `dt-api iterator()` has a fourth parameter to indicate that a return value is expected

The basic issue here was the `iterator()`'s automatic check to see if a
new API instance should be returned or not. If there are no results from
a selector the iterator will just use the original API instance to
return, but this isn't correct as we expect an empty result set in this
case. This is partly due to the fact that the top level methods (`row()`
for example) will return 2D arrays, while the child methods will flatten
the results, this is parhaps an error in the API, but too late to fix
now.

To address this, `iterator()` now has a parameter to tell it if a new
instance should be used or not. I debated about a new method
`iteratorNew()`, but I think this is just as clear (which isn't very
clear unfortunatly, but just needs to be made clear in the
documentation, which I've updated for this change).

I've added tests for the selectors with `deferRender` enabled. The test
suite is still in desperate need of update...
2014-11-03 15:18:18 +00:00
Allan Jardine
f8770a6b2a Update example: Use an initial value for the dt-api reduce() call to simplify the logic 2014-11-03 15:17:30 +00:00
Allan Jardine
e92582b45a Fix: Page length change will now attempt to keep the start point on the current page, but will shift that row's position away from the start point, so that the paging is always consistent in its display. Without this changing the page length could result in landing on page "1.4" (or some other partial page) that you could never get to with just paging alone. That is no longer possible in DataTables.
This is something that has been in DataTables since the version first
vresion and was contentious at that point so while this is a minor code
change, for me it is quite a big change! I feel that this is the correct
operation now, although it does result in rows being moved around where
they might not be needed to if partial pages could be used.
2014-10-30 15:15:20 +00:00
Allan Jardine
e62a747c2e New: dt-api $.fn.dataTable.util.escapeRegex() utility method for escaping regular expressions
Update example: Use the new `dt-api $.fn.dataTable.util.escapeRegex()` method to escape regex characters in the search input filter example
2014-10-30 11:26:34 +00:00
Allan Jardine
5c77a02f29 Fix: -tag caption was being inserted into the wrong elements when scrolling is enabled 2014-10-21 16:35:48 +01:00
Allan Jardine
eed543f566 Fix: jQuery references should be made to the aliased $.
Originally from DataTables/DataTables/pull/437
2014-10-21 09:31:24 +01:00
Allan Jardine
50d1466cfe Fix: If the language file fails to load, continue on as best we can. See thread 24046
Dev: Update the language init code to be a little more compact
2014-10-16 10:50:33 +01:00
Allan Jardine
744b6a901b Fix: When filtering HTML tags should be striped and were for a simple html type, but the html numeric types were not also receiving this treatment and thus the tags were included in the filter. This resolves that issue by adding search formatters along with sort formatters when the decimal place is known 2014-10-10 11:20:05 +01:00
Allan Jardine
1c3f7edfc2 Fix: Columns with mixed string and HTML types were not being detected as HTML type due to an early break 2014-10-10 10:54:25 +01:00
Allan Jardine
e06931ee0b Fix example: Improve code for multi-column select example 2014-10-10 10:54:11 +01:00
Allan Jardine
cfe6b6dce3 New object read from DOM example 2014-10-09 16:22:54 +01:00
Allan Jardine
fa89685d8b DataTables 1.10.3 2014-10-09 16:21:39 +01:00
Allan Jardine
0d92daf10f Dev: Remove debug line 2014-10-09 16:21:24 +01:00
Allan Jardine
9fa68d564f New: The row, column and cell selectors now all accept a function as a selector. The function will return true or false based on the defined logic to indiciate if the item should be included in the result set. This is particularly useful for searching the table for items of data. 2014-10-09 14:55:19 +01:00
Allan Jardine
d7a9aefb6f New: dt-api cells().render() and dt-api cell().render() methods to trigger the rendering methods for the orthogonal data types. Similar to the cache() methods but this will specifically trigger a render and also provides access to the type and display options which cache() does not. Generally it is expected that this will replace the cache() methods 2014-10-08 16:04:44 +01:00
Allan Jardine
b2ac7fa0f2 Dev: Fix previous commit for HTML5 attributes. The object constructed wasn't being correctly written 2014-10-08 16:04:27 +01:00
Allan Jardine
00c69698e3 Fix: Javascript error when using smart filtering with quotes for exact matching 2014-10-08 14:19:29 +01:00
Allan Jardine
a6b871d660 New: Ability to use dt-init columns.data with a DOM sourced data to read the row information into an object rather than an array (the default) 2014-10-08 14:19:14 +01:00
Allan Jardine
4f189464e4 New: dt-init searchDelay parameter that controls the throttle frequency for search requests using the global input text box 2014-10-08 11:28:51 +01:00
Allan Jardine
9a49208617 New: dt-api $.fn.dataTable.util.throttle() static utility method. This provides extension authors with an easy way to throttle function calls 2014-10-08 11:28:33 +01:00
Allan Jardine
5c8b72b8e8 Fix: Native Date instances weren't being detected as a date type
* This fixes DataTables/DataTables #385
2014-10-07 16:47:20 +01:00
Allan Jardine
997f3fa87c Update: bower.json updated with ignore, keywords and license 2014-10-07 16:08:19 +01:00
Allan Jardine
0e94078ad9 New: dt-api column().dataSrc() and dt-api columns().dataSrc() methods which provide the ability to obtain the data source parameter for one or more columns 2014-10-07 15:39:51 +01:00
Allan Jardine
6adf853864 Fix: jQuery UI integration when used with ColReorder could cause the wrong header to be shown as sorting
* This fixes DataTables/ColReorder #22
2014-10-07 15:39:36 +01:00
Allan Jardine
4e30d0ccf7 Fix example: Hidden columns description text had inversed logic for the column state 2014-10-07 15:39:22 +01:00
Allan Jardine
27901e11a4 Fix: If dt-init language.decimal was given as a decimal point, rather than the default decimal sort being performed, decimals were just being stripped 2014-10-07 15:39:06 +01:00
Allan Jardine
6f2092783b Dev: npm now requires the repository parameter
* This fixes DataTables/DataTables #427
2014-10-07 15:38:36 +01:00
Allan Jardine
c46168a91d Fix docs: Reference to dt-init paging was wrong 2014-10-07 15:36:30 +01:00
Allan Jardine
2b5fd456c3 Merge pull request #427 from mdmalinowski/patch-2
Add repository to package.json to stop npm error
2014-10-02 15:32:44 +01:00
Matthew Malinowski
d74849248c Add repository to package.json to stop npm error
Hi!

When installing DataTables from the repo with npm >v1.2.20, it'll WARN "No repository field." This small patch resolves that. (See https://www.npmjs.org/doc/files/package.json.html#repository or https://stackoverflow.com/questions/16827858/npm-warn-package-json-no-repository-field.)

I hope it's ok to propose this change against DataTables/DataTables -- I couldn't find a `package.json` in DataTablesSrc.

Thank you for your work!!
M
2014-10-02 10:10:42 -04:00
Allan Jardine
bc06f16e43 Update: dt-api iterator() updated to execute the callback in the scope of an API instance refering to the table in question 2014-09-22 16:41:41 +01:00
Allan Jardine
e0f02604cf Fix: dt-api destroy() when a child row was shown resulted in a JS error
See thread 23516 for more information
2014-09-22 10:50:40 +01:00
Allan Jardine
e0a08d511b Fix examples: SQLServer demo SQL gave a warning about inserting ids on an identify column 2014-09-22 10:50:24 +01:00
Allan Jardine
a8ce572cb3 Fix examples: Deferred rendering SSP example's initial HTML was out of date 2014-09-22 10:50:08 +01:00
Allan Jardine
491945bace Fix - examples: Incorrect column title for some server-side processing examples 2014-09-22 10:49:52 +01:00
Allan Jardine
3f219a38e2 Fix: Numeric sorting for 0 was incorrect
* This fixes DataTables/DataTables #414
2014-09-08 15:14:49 +01:00
Allan Jardine
cda203dbdc Fix: Example SQL database had extension field as an integer. However, that meant that numbers such as 0001 were not correctly saved 2014-09-08 15:14:33 +01:00
Allan Jardine
b1f1b2d961 Dev: Update bootstrap libraries to 3.2 2014-09-08 15:14:16 +01:00
Allan Jardine
4453229416 Fix exampple: Remove rowIndex from select_rows example - not used
Dev: Add comment to rowCallback trigger about undocumented parameters
2014-09-08 15:13:59 +01:00
Allan Jardine
14f5f630c9 Fix: Could not remove a multi-column sort using shift click like you could in 1.9-
This fixes DataTables/DataTables #391
2014-08-28 14:24:16 +01:00
Allan Jardine
3019ab9ec7 Fix: ARIA label for the sorting that will occur next wasn't working correctly 2014-08-28 14:23:59 +01:00
Allan Jardine
32a5bc6aee Fix docs: Typo in processing event example 2014-08-28 14:23:15 +01:00
Allan Jardine
267ab376b8 Update example: Update the select column filtering example to use dt-init initComplete
* There are often questions about why it isn't working with Ajax. it
  will now
2014-08-15 16:29:16 +01:00
Allan Jardine
e3a1d7b9a5 Workaround for dom text sorting 2014-08-06 11:21:27 +01:00
Allan Jardine
3978684f44 Update to 1.10.3-dev 2014-08-06 11:21:07 +01:00
Allan Jardine
f8a66288db Fix: Postgres generated SQL wouldn't allow a row to be inserted by Editor due to an incorrect sequence count 2014-08-06 11:18:44 +01:00
Allan Jardine
7df451fe4c Improved last page calculation.
Improved last page calculation when page size is changed on last page.
e.g. Suppose there are total 12 records and page size is set to 5 records/page. Go to last page, which should be 3, change page size to 10. Page#2 should be selected and it should show 2 records on it.
2014-08-06 11:17:57 +01:00
151 changed files with 6329 additions and 8563 deletions

View File

@@ -1 +1 @@
e6ea753d4408ad0a45b409ac8105d565075c21d9
ea35d6e1fec2a131887850b2decf1fcd0c90afe5

View File

@@ -1,9 +1,18 @@
# Contributing
# Support requests
Please direct support requests to the [DataTables forums](https://datatables.net/forums), ensuring that you provide a link to a test page that shows the problem and a full description of the issue. If you require urgent help, [priority support](https://datatables.net/support) is available.
# Contributing code
If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. In order to keep thing manageable, there are a number of guidelines that should be followed in order to ensure that your modification is included in DataTables as quickly as possible:
1. Make contributions in the DataTables/DataTablesSrc repo. Changes to the built files in the built repo (DataTables/DataTables) will not be accepted since they would be overwritten by the next build!
2. Follow the style of the code in the existing files. DataTables doesn't have a coding standards document, but simple common sense of following the same style as in the existing files is ideal. For example use tabs not spaces (as you will see all source files use tabs).
2. Follow the style of the code in the existing files. They might not be to everyone's tastes, but consistency is key for a mature project like DataTables. DataTables doesn't have a coding standards document, but simple common sense of following the same style as in the existing files is ideal. For example use tabs not spaces (as you will see all source files use tabs).
3. Link to a test page showing the bug you are fixing or the feature you are adding. This allows to me to quickly identify what is being changed and why. Don't worry about being verbose in pull requests - its much better to know exactly what is changing and why!
4. DataTables is a large and complex project and it isn't always possible or suitable to pull in every suggested change. Please don't be offended if a pull request is not merged in, it will explained why not if this is the case. Also it isn't always possible to fully check and test pull requests as quickly as I would like due to other commitments. Again this is no reflection on your pull request, just the busy life that we all lead! If you have any questions about your potential contribution and its place in the DataTables project structure, please ask ahead of time in the [DataTables forums](//datatables.net/forums).
5. Pull requests will only be accepted if you acknowledge that your contribution is offered under and will be made available under the project's existing license (MIT). If your initial pull request doesn't explicitly acknowledge this I'll ask before it is pulled in.

View File

@@ -1,11 +1,32 @@
{
"name": "datatables",
"version": "1.10.2",
"version": "1.10.7",
"main": [
"media/js/jquery.dataTables.js",
"media/css/jquery.dataTables.css"
"media/css/jquery.dataTables.css",
"media/images/sort_asc.png",
"media/images/sort_asc_disabled.png",
"media/images/sort_both.png",
"media/images/sort_desc.png",
"media/images/sort_desc_disabled.png"
],
"dependencies": {
"jquery": ">=1.7.0"
}
},
"license": "MIT",
"keywords": [
"jquery",
"datatables",
"table",
"javascript",
"library"
],
"ignore": [
"/.*",
"examples",
"media/unit_testing",
"composer.json",
"dataTables.jquery.json",
"package.json"
]
}

View File

@@ -1,6 +1,6 @@
{
"name": "datatables/datatables",
"version": "1.10.2",
"version": "1.10.7",
"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",

View File

@@ -1,6 +1,6 @@
{
"name": "DataTables",
"version": "1.10.2",
"version": "1.10.7",
"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/",

View File

@@ -46,18 +46,14 @@ $(document).ready(function() {
<h1>DataTables example <span>Column rendering</span></h1>
<div class="info">
<p>Each column has an optional rendering control called <a href=
"//datatables.net/reference/option/columns.render"><code class="option" title=
"DataTables initialisation option">columns.render<span>DT</span></code></a> which can be used to
process the content of each cell before the data is used. <a href=
"//datatables.net/reference/option/columns.render"><code class="option" title=
"DataTables initialisation option">columns.render<span>DT</span></code></a> has a wide array of options
available to it for rendering different types of data orthogonally (ordering, searching, display etc),
but it can be used very simply to manipulate the content of a cell, as shown here.</p>
<p>Each column has an optional rendering control called <a href="//datatables.net/reference/option/columns.render"><code class="option" title=
"DataTables initialisation option">columns.render<span>DT</span></code></a> which can be used to process the content of each cell before the data is used. <a href=
"//datatables.net/reference/option/columns.render"><code class="option" title="DataTables initialisation option">columns.render<span>DT</span></code></a> has a
wide array of options available to it for rendering different types of data orthogonally (ordering, searching, display etc), but it can be used very simply to
manipulate the content of a cell, as shown here.</p>
<p>This example shows the person's age combined with their name in the first column, hiding the age
column. This technique can be useful for adding links, assigning colours based on content rules and any
other form of text manipulation you require.</p>
<p>This example shows the person's age combined with their name in the first column, hiding the age column. This technique can be useful for adding links,
assigning colours based on content rules and any other form of text manipulation you require.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -553,8 +549,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;columnDefs&quot;: [
{
@@ -571,8 +566,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -581,36 +575,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -633,8 +622,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -642,8 +630,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -658,7 +645,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -701,14 +690,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -745,8 +731,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -754,10 +739,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -765,14 +748,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -38,23 +38,18 @@ $(document).ready(function() {
<h1>DataTables example <span>Complex headers (rowspan / colspan)</span></h1>
<div class="info">
<p>Complex headers (using colspan / rowspan) can be used to group columns of similar information in
DataTables, creating a very powerful visual effect.</p>
<p>Complex headers (using colspan / rowspan) can be used to group columns of similar information in DataTables, creating a very powerful visual effect.</p>
<p>In addition to the basic behaviour, DataTables can also take colspan and rowspans 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 <a href=
"//datatables.net/reference/option/columns.visible"><code class="option" title=
"DataTables initialisation option">columns.visible<span>DT</span></code></a> option and <a href=
"//datatables.net/reference/api/column().visible()"><code class="api" title=
"DataTables API method">column().visible()<span>DT</span></code></a> method to take into account
rowspan / colspan cells, drawing the header correctly.</p>
<p>In addition to the basic behaviour, DataTables can also take colspan and rowspans 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 <a href=
"//datatables.net/reference/option/columns.visible"><code class="option" title="DataTables initialisation option">columns.visible<span>DT</span></code></a> option
and <a href="//datatables.net/reference/api/column().visible()"><code class="api" title="DataTables API method">column().visible()<span>DT</span></code></a> method
to take into account rowspan / colspan cells, drawing the header correctly.</p>
<p>Note that each column must have at least one unique cell (i.e. a cell without colspan) so DataTables
can use that cell to detect the column and use it to apply ordering.</p>
<p>Note that each column must have at least one unique cell (i.e. a cell without colspan) so DataTables can use that cell to detect the column and use it to apply
ordering.</p>
<p>The example below shows a header spanning multiple cells over the contact information, with one of
the columns that the span covers being hidden.</p>
<p>The example below shows a header spanning multiple cells over the contact information, with one of the columns that the span covers being hidden.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -554,8 +549,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;columnDefs&quot;: [ {
&quot;visible&quot;: false,
@@ -564,8 +558,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -574,36 +567,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -626,8 +614,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -635,8 +622,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -650,9 +636,10 @@ $(document).ready(function() {
<li><a href="./column_render.html">Column rendering</a></li>
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li class="active"><a href="./complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li class="active"><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -695,14 +682,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -739,8 +723,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -748,10 +731,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -759,14 +740,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -39,16 +39,12 @@ $(document).ready(function() {
<h1>DataTables example <span>Setting defaults</span></h1>
<div class="info">
<p>When working with DataTables over multiple pages it is often useful to set the initialisation
defaults to common values (for example you might want to set <a href=
"//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> to a common value so all tables get
the same layout). This can be done using the <code>$.fn.dataTable.defaults</code> object. This object
will take all of the same parameters as the DataTables initialisation object, but in this case you are
setting the default for all future initialisations of DataTables.</p>
<p>When working with DataTables over multiple pages it is often useful to set the initialisation defaults to common values (for example you might want to set
<a href="//datatables.net/reference/option/dom"><code class="option" title="DataTables initialisation option">dom<span>DT</span></code></a> to a common value so
all tables get the same layout). This can be done using the <code>$.fn.dataTable.defaults</code> object. This object will take all of the same parameters as the
DataTables initialisation object, but in this case you are setting the default for all future initialisations of DataTables.</p>
<p>This example shows the searching and ordering features of DataTables being disabled by default,
which is reflected in the table when it is initialised.</p>
<p>This example shows the searching and ordering features of DataTables being disabled by default, which is reflected in the table when it is initialised.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -544,8 +540,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$.extend( $.fn.dataTable.defaults, {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$.extend( $.fn.dataTable.defaults, {
&quot;searching&quot;: false,
&quot;ordering&quot;: false
} );
@@ -555,8 +550,7 @@ $(document).ready(function() {
$('#example').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -565,36 +559,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -617,8 +606,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -626,8 +614,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -642,7 +629,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li class="active"><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -685,14 +674,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -729,8 +715,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -738,10 +723,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -749,14 +732,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,18 +43,14 @@ $(document).ready(function() {
<h1>DataTables example <span>Multiple table control elements</span></h1>
<div class="info">
<p>As is described by the basic DOM positioning example you can use the <a href=
"//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter to move
DataTables features around the table to where you want them. In addition to this, you can also use
<a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> to create multiple instances of these
table controls. Simply include the feature's identification letter where you want it to appear, as many
times as you wish, and the controls will all sync up (note that obviously the table ('t') should be
included only once).</p>
<p>As is described by the basic DOM positioning example you can use the <a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter to move DataTables features around the table to where you want them. In
addition to this, you can also use <a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> to create multiple instances of these table controls. Simply include the feature's identification
letter where you want it to appear, as many times as you wish, and the controls will all sync up (note that obviously the table ('t') should be included only
once).</p>
<p>This is shown in the demo below where for four key build-in features are duplicated above and below
the table.</p>
<p>This is shown in the demo below where for four key build-in features are duplicated above and below the table.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -550,15 +546,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;dom&quot;: '&lt;&quot;top&quot;iflp&lt;&quot;clear&quot;&gt;&gt;rt&lt;&quot;bottom&quot;iflp&lt;&quot;clear&quot;&gt;&gt;'
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -567,15 +561,13 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">div.dataTables_length {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">div.dataTables_length {
padding-left: 2em;
}
div.dataTables_length,
@@ -584,25 +576,22 @@ $(document).ready(function() {
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -625,8 +614,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -634,8 +622,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -648,10 +635,11 @@ $(document).ready(function() {
<li><a href="./dt_events.html">DataTables events</a></li>
<li><a href="./column_render.html">Column rendering</a></li>
<li><a href="./length_menu.html">Page length options</a></li>
<li class="active"><a href="./dom_multiple_elements.html">Multiple table control
elements</a></li>
<li class="active"><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -694,14 +682,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -738,8 +723,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -747,10 +731,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -758,14 +740,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,24 +43,18 @@ $(document).ready(function() {
<h1>DataTables example <span>Custom toolbar elements</span></h1>
<div class="info">
<p>DataTables inserts DOM elements around the table to control DataTables features, and you can make
use of this mechanism as well to insert your own custom elements. In this example a <code class="tag"
title="HTML tag">div</code> with a class of 'toolbar' is created using <a href=
"//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a>, with which HTML is inserted to create
the toolbar. You could put whatever HTML you want into the toolbar and add event handlers etc.</p>
<p>DataTables inserts DOM elements around the table to control DataTables features, and you can make use of this mechanism as well to insert your own custom
elements. In this example a <code class="tag" title="HTML tag">div</code> with a class of 'toolbar' is created using <a href=
"//datatables.net/reference/option/dom"><code class="option" title="DataTables initialisation option">dom<span>DT</span></code></a>, with which HTML is inserted to
create the toolbar. You could put whatever HTML you want into the toolbar and add event handlers etc.</p>
<p>For more complex features, or for creating reusable plug-ins, DataTables also has a feature plug-in
API available, which can be used to create plug-ins which are used in a table by a single character
reference in the <a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> option (like the built in option of
<code class="string" title="String">f</code> refers to 'filtering input', you could have an
<code class="string" title="String">F</code> option which creates your own filtering input control,
custom to your app).</p>
<p>For more complex features, or for creating reusable plug-ins, DataTables also has a feature plug-in API available, which can be used to create plug-ins which
are used in a table by a single character reference in the <a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> option (like the built in option of <code class="string" title="String">f</code> refers to
'filtering input', you could have an <code class="string" title="String">F</code> option which creates your own filtering input control, custom to your app).</p>
<p><a href="https://datatables.net/extras/tabletools">TableTools</a> is a feature plug-in for
DataTables which adds buttons into a toolbar for a table, which controls such as copy to clipboard,
export and custom buttons.</p>
<p><a href="https://datatables.net/extras/tabletools">TableTools</a> is a feature plug-in for DataTables which adds buttons into a toolbar for a table, which
controls such as copy to clipboard, export and custom buttons.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -556,8 +550,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;dom&quot;: '&lt;&quot;toolbar&quot;&gt;frtip'
} );
@@ -565,8 +558,7 @@ $(document).ready(function() {
$(&quot;div.toolbar&quot;).html('&lt;b&gt;Custom tool bar! Text/images etc.&lt;/b&gt;');
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -575,38 +567,33 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">.toolbar {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">.toolbar {
float: left;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -629,8 +616,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -638,8 +624,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -654,7 +639,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -697,14 +684,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -741,8 +725,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -750,10 +733,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -761,14 +742,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,23 +43,17 @@ $(document).ready(function() {
<h1>DataTables example <span>DataTables events</span></h1>
<div class="info">
<p>DataTables fires a number of custom events which you can bind to in the standard jQuery fashion
(although note that the namespace <code>dt</code> <em>must</em> be used), allowing your code to perform
custom actions when these events occur.</p>
<p>DataTables fires a number of custom events which you can bind to in the standard jQuery fashion (although note that the namespace <code>dt</code> <em>must</em>
be used), allowing your code to perform custom actions when these events occur.</p>
<p>All custom events fired by DataTables are fired with the namespace <code>dt</code> in order to
prevent conflicts arising with other jQuery plug-ins which also fire events. The DataTables <a href=
"//datatables.net/reference/api/on()"><code class="api" title=
"DataTables API method">on()<span>DT</span></code></a> method can be used like the jQuery
<code>on()</code> method, but will automatically append the <code>dt</code> namespace if required.</p>
<p>All custom events fired by DataTables are fired with the namespace <code>dt</code> in order to prevent conflicts arising with other jQuery plug-ins which also
fire events. The DataTables <a href="//datatables.net/reference/api/on()"><code class="api" title="DataTables API method">on()<span>DT</span></code></a> method can
be used like the jQuery <code>on()</code> method, but will automatically append the <code>dt</code> namespace if required.</p>
<p>This example shows the use of the <a href="//datatables.net/reference/event/order"><code class=
"event" title="DataTables event">order<span>DT</span></code></a>, <a href=
"//datatables.net/reference/event/search"><code class="event" title=
"DataTables event">search<span>DT</span></code></a> and <a href=
"//datatables.net/reference/event/page"><code class="event" title=
"DataTables event">page<span>DT</span></code></a> events by adding a notification that the event fired
to an element on the page to show that they have indeed fired.</p>
<p>This example shows the use of the <a href="//datatables.net/reference/event/order"><code class="event" title="DataTables event">order<span>DT</span></code></a>,
<a href="//datatables.net/reference/event/search"><code class="event" title="DataTables event">search<span>DT</span></code></a> and <a href=
"//datatables.net/reference/event/page"><code class="event" title="DataTables event">page<span>DT</span></code></a> events by adding a notification that the event
fired to an element on the page to show that they have indeed fired.</p>
</div>
<div id="demo_info" class="box"></div>
@@ -557,8 +551,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var eventFired = function ( type ) {
var n = $('#demo_info')[0];
n.innerHTML += '&lt;div&gt;'+type+' event - '+new Date().getTime()+'&lt;/div&gt;';
@@ -572,8 +565,7 @@ $(document).ready(function() {
.dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -582,36 +574,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -634,8 +621,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -643,8 +629,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -659,7 +644,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -702,14 +689,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -746,8 +730,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -755,10 +738,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -766,14 +747,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -38,13 +38,11 @@ $(document).ready(function() {
<h1>DataTables example <span>DOM / jQuery events</span></h1>
<div class="info">
<p>Events assigned to the table can be exceptionally useful for user interaction, however you must be
aware that DataTables will add and remove rows from the DOM as they are needed (i.e. when paging only
the visible elements are actually available in the DOM). As such, this can lead to the odd hiccup when
working with events.</p>
<p>Events assigned to the table can be exceptionally useful for user interaction, however you must be aware that DataTables will add and remove rows from the DOM
as they are needed (i.e. when paging only the visible elements are actually available in the DOM). As such, this can lead to the odd hiccup when working with
events.</p>
<p>One of the best ways of dealing with this is through the use of delegated events with jQuery's
<code>on</code> method, as shown in this example.</p>
<p>One of the best ways of dealing with this is through the use of delegated events with jQuery's <code>on</code> method, as shown in this example.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -540,8 +538,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable();
$('#example tbody').on('click', 'tr', function () {
@@ -550,8 +547,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -560,36 +556,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -612,8 +603,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -621,8 +611,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -637,7 +626,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -680,14 +671,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -724,8 +712,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -733,10 +720,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -744,14 +729,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,20 +35,20 @@ $(document).ready(function() {
};
// Total over all pages
data = api.column( 4 ).data();
total = data.length ?
data.reduce( function (a, b) {
return intVal(a) + intVal(b);
} ) :
0;
total = api
.column( 4 )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
} );
// Total over this page
data = api.column( 4, { page: 'current'} ).data();
pageTotal = data.length ?
data.reduce( function (a, b) {
return intVal(a) + intVal(b);
} ) :
0;
pageTotal = api
.column( 4, { page: 'current'} )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
// Update footer
$( api.column( 4 ).footer() ).html(
@@ -68,20 +68,15 @@ $(document).ready(function() {
<h1>DataTables example <span>Footer callback</span></h1>
<div class="info">
<p>Through the use of the header and footer callback manipulation functions provided by DataTables
(<a href="//datatables.net/reference/option/headerCallback"><code class="option" title=
"DataTables initialisation option">headerCallback<span>DT</span></code></a> and <a href=
"//datatables.net/reference/option/footerCallback"><code class="option" title=
"DataTables initialisation option">footerCallback<span>DT</span></code></a>), it is possible to perform
some powerful and useful data manipulation functions, such as summarising data in the table.</p>
<p>Through the use of the header and footer callback manipulation functions provided by DataTables (<a href=
"//datatables.net/reference/option/headerCallback"><code class="option" title="DataTables initialisation option">headerCallback<span>DT</span></code></a> and
<a href="//datatables.net/reference/option/footerCallback"><code class="option" title="DataTables initialisation option">footerCallback<span>DT</span></code></a>),
it is possible to perform some powerful and useful data manipulation functions, such as summarising data in the table.</p>
<p>The example below shows a footer callback being used to total the data for a column (both the
visible and the hidden data) using the <a href=
"//datatables.net/reference/api/column().data()"><code class="api" title=
"DataTables API method">column().data()<span>DT</span></code></a> API method and <a href=
"//datatables.net/reference/api/column().footer()"><code class="api" title=
"DataTables API method">column().footer()<span>DT</span></code></a> for writing the value into the
footer.</p>
<p>The example below shows a footer callback being used to total the data for a column (both the visible and the hidden data) using the <a href=
"//datatables.net/reference/api/column().data()"><code class="api" title="DataTables API method">column().data()<span>DT</span></code></a> API method and <a href=
"//datatables.net/reference/api/column().footer()"><code class="api" title="DataTables API method">column().footer()<span>DT</span></code></a> for writing the
value into the footer.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -515,8 +510,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;footerCallback&quot;: function ( row, data, start, end, display ) {
var api = this.api(), data;
@@ -530,20 +524,20 @@ $(document).ready(function() {
};
// Total over all pages
data = api.column( 4 ).data();
total = data.length ?
data.reduce( function (a, b) {
return intVal(a) + intVal(b);
} ) :
0;
total = api
.column( 4 )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
} );
// Total over this page
data = api.column( 4, { page: 'current'} ).data();
pageTotal = data.length ?
data.reduce( function (a, b) {
return intVal(a) + intVal(b);
} ) :
0;
pageTotal = api
.column( 4, { page: 'current'} )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
// Update footer
$( api.column( 4 ).footer() ).html(
@@ -553,8 +547,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -563,36 +556,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">th { white-space: nowrap; }</code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">th { white-space: nowrap; }</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -615,8 +603,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -624,8 +611,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -640,7 +626,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -683,14 +671,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -727,8 +712,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -736,10 +720,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -747,14 +729,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -5,7 +5,7 @@
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - HTML5 data-* attributes</title>
<title>DataTables example - HTML5 data-* attributes - cell data</title>
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
@@ -20,7 +20,7 @@
$(document).ready(function() {
$('#example').dataTable();
$('#example').DataTable();
} );
@@ -30,33 +30,27 @@ $(document).ready(function() {
<body class="dt-example">
<div class="container">
<section>
<h1>DataTables example <span>HTML5 data-* attributes</span></h1>
<h1>DataTables example <span>HTML5 data-* attributes - cell data</span></h1>
<div class="info">
<p>DataTables can use different data for different actions (display, ordering and searching) which can
be immensely powerful for transforming data in the display to be intuitive for the end user, while
using different, or more complex data, for other actions. For example, if a table contains a formatted
telephone number in the format <code>xxx-xxxx</code>, intuitively a user might search for the number
but without a dash. Using orthogonal data for searching allows both forms of the telephone number to be
used, while only the nicely formatted number is displayed in the table.</p>
<p>DataTables can use different data for different actions (display, ordering and searching) which can be immensely powerful for transforming data in the display
to be intuitive for the end user, while using different, or more complex data, for other actions. For example, if a table contains a formatted telephone number in
the format <code>xxx-xxxx</code>, intuitively a user might search for the number but without a dash. Using orthogonal data for searching allows both forms of the
telephone number to be used, while only the nicely formatted number is displayed in the table.</p>
<p>One method in which DataTables can obtain this orthogonal data for its different actions is through
<a href=
"http://www.w3.org/html/wg/drafts/html/master/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes">
custom HTML5 data attributes</a>. DataTables will automatically detect four different attributes on the
HTML elements:</p>
<p>One method in which DataTables can obtain this orthogonal data for its different actions is through <a href=
"http://www.w3.org/html/wg/drafts/html/master/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes">custom HTML5 data attributes</a>. DataTables
will automatically detect four different attributes on the HTML elements:</p>
<ul class="markdown">
<li><code>data-sort</code> or <code>data-order</code> - for ordering data</li>
<li><code>data-filter</code> or <code>data-search</code> - for search data</li>
</ul>
<p>This example shows the use of <code>data-sort</code> and <code>data-filter</code> attributes. In
this case the first column has been formatted so the first name has abbreviated, but the full name is
still searchable (search for "Bruno" for example). Additionally, although the last column contains
non-numeric data in it (<code>/y</code>) the column will correctly order numerically as the
<code>data-sort</code> / <code>data-order</code> attribute is set on the column with plain numeric
data.</p>
<p>This example shows the use of <code>data-sort</code> and <code>data-filter</code> attributes. In this case the first column has been formatted so the first name
has abbreviated, but the full name is still searchable (search for "Bruno" for example). Additionally, although the last column contains non-numeric data in it
(<code>/y</code>) the column will correctly order numerically as the <code>data-sort</code> / <code>data-order</code> attribute is set on the column with plain
numeric data.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -552,13 +546,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
$('#example').dataTable();
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').DataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -567,36 +559,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -619,8 +606,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -628,8 +614,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -644,7 +629,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li class="active"><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li class="active"><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -687,14 +674,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -731,8 +715,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -740,10 +723,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -751,14 +732,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -0,0 +1,745 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - HTML5 data-* attributes - table options</title>
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="../resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="../resources/demo.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
$('#example').DataTable();
} );
</script>
</head>
<body class="dt-example">
<div class="container">
<section>
<h1>DataTables example <span>HTML5 data-* attributes - table options</span></h1>
<div class="info">
<p>As of DataTables 1.10.5 it is now possible to define <a href="//datatables.net/reference/option">initialisation options</a> using HTML5 <code>data-*</code>
attributes. The attribute names are read by DataTables and used, potentially in combination with, the standard Javascript initialisation options (with the
<code>data-*</code> attributes taking priority).</p>
<p>Please note that the attribute values must contain valid JSON data or a Javascript primitive (as require by <a href=
"http://api.jquery.com/data/#data-html5">jQuery's <code>$().data()</code> method</a> - this means that double quotes should be used inside the attribute if needed
for a string (see the <code>data-order</code> example below).</p>
<p>Additionally, jQuery will convert a dashed string into the camel-case notation used by DataTables for its options. For example <code>data-page-length</code> is
used to represent <a href="//datatables.net/reference/option/pageLength"><code class="option" title=
"DataTables initialisation option">pageLength<span>DT</span></code></a>.</p>
<p>The table below shows the use of <a href="//datatables.net/reference/option/pageLength"><code class="option" title=
"DataTables initialisation option">pageLength<span>DT</span></code></a> and <a href="//datatables.net/reference/option/order"><code class="option" title=
"DataTables initialisation option">order<span>DT</span></code></a> on the main table. Column options can also be defined on the table column cells, as shown by the
use of the <a href="//datatables.net/reference/option/columns.orderable"><code class="option" title=
"DataTables initialisation option">columns.orderable<span>DT</span></code></a> option on the fifth column below.</p>
</div>
<table id="example" class="display" width="100%" data-page-length="25" data-order="[[ 1, &quot;asc&quot; ]]">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th data-orderable="false">Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>2012/03/29</td>
<td>$433,060</td>
</tr>
<tr>
<td>Airi Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
</tr>
<tr>
<td>Brielle Williamson</td>
<td>Integration Specialist</td>
<td>New York</td>
<td>61</td>
<td>2012/12/02</td>
<td>$372,000</td>
</tr>
<tr>
<td>Herrod Chandler</td>
<td>Sales Assistant</td>
<td>San Francisco</td>
<td>59</td>
<td>2012/08/06</td>
<td>$137,500</td>
</tr>
<tr>
<td>Rhona Davidson</td>
<td>Integration Specialist</td>
<td>Tokyo</td>
<td>55</td>
<td>2010/10/14</td>
<td>$327,900</td>
</tr>
<tr>
<td>Colleen Hurst</td>
<td>Javascript Developer</td>
<td>San Francisco</td>
<td>39</td>
<td>2009/09/15</td>
<td>$205,500</td>
</tr>
<tr>
<td>Sonya Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>2008/12/13</td>
<td>$103,600</td>
</tr>
<tr>
<td>Jena Gaines</td>
<td>Office Manager</td>
<td>London</td>
<td>30</td>
<td>2008/12/19</td>
<td>$90,560</td>
</tr>
<tr>
<td>Quinn Flynn</td>
<td>Support Lead</td>
<td>Edinburgh</td>
<td>22</td>
<td>2013/03/03</td>
<td>$342,000</td>
</tr>
<tr>
<td>Charde Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$470,600</td>
</tr>
<tr>
<td>Haley Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>2012/12/18</td>
<td>$313,500</td>
</tr>
<tr>
<td>Tatyana Fitzpatrick</td>
<td>Regional Director</td>
<td>London</td>
<td>19</td>
<td>2010/03/17</td>
<td>$385,750</td>
</tr>
<tr>
<td>Michael Silva</td>
<td>Marketing Designer</td>
<td>London</td>
<td>66</td>
<td>2012/11/27</td>
<td>$198,500</td>
</tr>
<tr>
<td>Paul Byrd</td>
<td>Chief Financial Officer (CFO)</td>
<td>New York</td>
<td>64</td>
<td>2010/06/09</td>
<td>$725,000</td>
</tr>
<tr>
<td>Gloria Little</td>
<td>Systems Administrator</td>
<td>New York</td>
<td>59</td>
<td>2009/04/10</td>
<td>$237,500</td>
</tr>
<tr>
<td>Bradley Greer</td>
<td>Software Engineer</td>
<td>London</td>
<td>41</td>
<td>2012/10/13</td>
<td>$132,000</td>
</tr>
<tr>
<td>Dai Rios</td>
<td>Personnel Lead</td>
<td>Edinburgh</td>
<td>35</td>
<td>2012/09/26</td>
<td>$217,500</td>
</tr>
<tr>
<td>Jenette Caldwell</td>
<td>Development Lead</td>
<td>New York</td>
<td>30</td>
<td>2011/09/03</td>
<td>$345,000</td>
</tr>
<tr>
<td>Yuri Berry</td>
<td>Chief Marketing Officer (CMO)</td>
<td>New York</td>
<td>40</td>
<td>2009/06/25</td>
<td>$675,000</td>
</tr>
<tr>
<td>Caesar Vance</td>
<td>Pre-Sales Support</td>
<td>New York</td>
<td>21</td>
<td>2011/12/12</td>
<td>$106,450</td>
</tr>
<tr>
<td>Doris Wilder</td>
<td>Sales Assistant</td>
<td>Sidney</td>
<td>23</td>
<td>2010/09/20</td>
<td>$85,600</td>
</tr>
<tr>
<td>Angelica Ramos</td>
<td>Chief Executive Officer (CEO)</td>
<td>London</td>
<td>47</td>
<td>2009/10/09</td>
<td>$1,200,000</td>
</tr>
<tr>
<td>Gavin Joyce</td>
<td>Developer</td>
<td>Edinburgh</td>
<td>42</td>
<td>2010/12/22</td>
<td>$92,575</td>
</tr>
<tr>
<td>Jennifer Chang</td>
<td>Regional Director</td>
<td>Singapore</td>
<td>28</td>
<td>2010/11/14</td>
<td>$357,650</td>
</tr>
<tr>
<td>Brenden Wagner</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>28</td>
<td>2011/06/07</td>
<td>$206,850</td>
</tr>
<tr>
<td>Fiona Green</td>
<td>Chief Operating Officer (COO)</td>
<td>San Francisco</td>
<td>48</td>
<td>2010/03/11</td>
<td>$850,000</td>
</tr>
<tr>
<td>Shou Itou</td>
<td>Regional Marketing</td>
<td>Tokyo</td>
<td>20</td>
<td>2011/08/14</td>
<td>$163,000</td>
</tr>
<tr>
<td>Michelle House</td>
<td>Integration Specialist</td>
<td>Sidney</td>
<td>37</td>
<td>2011/06/02</td>
<td>$95,400</td>
</tr>
<tr>
<td>Suki Burks</td>
<td>Developer</td>
<td>London</td>
<td>53</td>
<td>2009/10/22</td>
<td>$114,500</td>
</tr>
<tr>
<td>Prescott Bartlett</td>
<td>Technical Author</td>
<td>London</td>
<td>27</td>
<td>2011/05/07</td>
<td>$145,000</td>
</tr>
<tr>
<td>Gavin Cortez</td>
<td>Team Leader</td>
<td>San Francisco</td>
<td>22</td>
<td>2008/10/26</td>
<td>$235,500</td>
</tr>
<tr>
<td>Martena Mccray</td>
<td>Post-Sales support</td>
<td>Edinburgh</td>
<td>46</td>
<td>2011/03/09</td>
<td>$324,050</td>
</tr>
<tr>
<td>Unity Butler</td>
<td>Marketing Designer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/12/09</td>
<td>$85,675</td>
</tr>
<tr>
<td>Howard Hatfield</td>
<td>Office Manager</td>
<td>San Francisco</td>
<td>51</td>
<td>2008/12/16</td>
<td>$164,500</td>
</tr>
<tr>
<td>Hope Fuentes</td>
<td>Secretary</td>
<td>San Francisco</td>
<td>41</td>
<td>2010/02/12</td>
<td>$109,850</td>
</tr>
<tr>
<td>Vivian Harrell</td>
<td>Financial Controller</td>
<td>San Francisco</td>
<td>62</td>
<td>2009/02/14</td>
<td>$452,500</td>
</tr>
<tr>
<td>Timothy Mooney</td>
<td>Office Manager</td>
<td>London</td>
<td>37</td>
<td>2008/12/11</td>
<td>$136,200</td>
</tr>
<tr>
<td>Jackson Bradshaw</td>
<td>Director</td>
<td>New York</td>
<td>65</td>
<td>2008/09/26</td>
<td>$645,750</td>
</tr>
<tr>
<td>Olivia Liang</td>
<td>Support Engineer</td>
<td>Singapore</td>
<td>64</td>
<td>2011/02/03</td>
<td>$234,500</td>
</tr>
<tr>
<td>Bruno Nash</td>
<td>Software Engineer</td>
<td>London</td>
<td>38</td>
<td>2011/05/03</td>
<td>$163,500</td>
</tr>
<tr>
<td>Sakura Yamamoto</td>
<td>Support Engineer</td>
<td>Tokyo</td>
<td>37</td>
<td>2009/08/19</td>
<td>$139,575</td>
</tr>
<tr>
<td>Thor Walton</td>
<td>Developer</td>
<td>New York</td>
<td>61</td>
<td>2013/08/11</td>
<td>$98,540</td>
</tr>
<tr>
<td>Finn Camacho</td>
<td>Support Engineer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/07/07</td>
<td>$87,500</td>
</tr>
<tr>
<td>Serge Baldwin</td>
<td>Data Coordinator</td>
<td>Singapore</td>
<td>64</td>
<td>2012/04/09</td>
<td>$138,575</td>
</tr>
<tr>
<td>Zenaida Frank</td>
<td>Software Engineer</td>
<td>New York</td>
<td>63</td>
<td>2010/01/04</td>
<td>$125,250</td>
</tr>
<tr>
<td>Zorita Serrano</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>56</td>
<td>2012/06/01</td>
<td>$115,000</td>
</tr>
<tr>
<td>Jennifer Acosta</td>
<td>Junior Javascript Developer</td>
<td>Edinburgh</td>
<td>43</td>
<td>2013/02/01</td>
<td>$75,650</td>
</tr>
<tr>
<td>Cara Stevens</td>
<td>Sales Assistant</td>
<td>New York</td>
<td>46</td>
<td>2011/12/06</td>
<td>$145,600</td>
</tr>
<tr>
<td>Hermione Butler</td>
<td>Regional Director</td>
<td>London</td>
<td>47</td>
<td>2011/03/21</td>
<td>$356,250</td>
</tr>
<tr>
<td>Lael Greer</td>
<td>Systems Administrator</td>
<td>London</td>
<td>21</td>
<td>2009/02/27</td>
<td>$103,500</td>
</tr>
<tr>
<td>Jonas Alexander</td>
<td>Developer</td>
<td>San Francisco</td>
<td>30</td>
<td>2010/07/14</td>
<td>$86,500</td>
</tr>
<tr>
<td>Shad Decker</td>
<td>Regional Director</td>
<td>Edinburgh</td>
<td>51</td>
<td>2008/11/13</td>
<td>$183,000</td>
</tr>
<tr>
<td>Michael Bruce</td>
<td>Javascript Developer</td>
<td>Singapore</td>
<td>29</td>
<td>2011/06/27</td>
<td>$183,000</td>
</tr>
<tr>
<td>Donna Snider</td>
<td>Customer Support</td>
<td>New York</td>
<td>27</td>
<td>2011/01/25</td>
<td>$112,000</td>
</tr>
</tbody>
</table>
<ul class="tabs">
<li class="active">Javascript</li>
<li>HTML</li>
<li>CSS</li>
<li>Ajax</li>
<li>Server-side script</li>
</ul>
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').DataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
<li><a href="../../media/js/jquery.dataTables.js">../../media/js/jquery.dataTables.js</a></li>
</ul>
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
</div>
<section>
<div class="footer">
<div class="gradient"></div>
<div class="liner">
<h2>Other examples</h2>
<div class="toc">
<div class="toc-group">
<h3><a href="../basic_init/index.html">Basic initialisation</a></h3>
<ul class="toc">
<li><a href="../basic_init/zero_configuration.html">Zero configuration</a></li>
<li><a href="../basic_init/filter_only.html">Feature enable / disable</a></li>
<li><a href="../basic_init/table_sorting.html">Default ordering (sorting)</a></li>
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
<li><a href="../basic_init/alt_pagination.html">Alternative pagination</a></li>
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="./index.html">Advanced initialisation</a></h3>
<ul class="toc active">
<li><a href="./events_live.html">DOM / jQuery events</a></li>
<li><a href="./dt_events.html">DataTables events</a></li>
<li><a href="./column_render.html">Column rendering</a></li>
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li class="active"><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
<li><a href="./row_grouping.html">Row grouping</a></li>
<li><a href="./footer_callback.html">Footer callback</a></li>
<li><a href="./dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="./sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../styling/index.html">Styling</a></h3>
<ul class="toc">
<li><a href="../styling/display.html">Base style</a></li>
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
<li><a href="../styling/compact.html">Base style - compact</a></li>
<li><a href="../styling/hover.html">Base style - hover</a></li>
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
<li><a href="../styling/foundation.html">Foundation</a></li>
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../data_sources/index.html">Data sources</a></h3>
<ul class="toc">
<li><a href="../data_sources/dom.html">HTML (DOM) sourced data</a></li>
<li><a href="../data_sources/ajax.html">Ajax sourced data</a></li>
<li><a href="../data_sources/js_array.html">Javascript sourced data</a></li>
<li><a href="../data_sources/server_side.html">Server-side processing</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../api/index.html">API</a></h3>
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../ajax/index.html">Ajax</a></h3>
<ul class="toc">
<li><a href="../ajax/simple.html">Ajax data source (arrays)</a></li>
<li><a href="../ajax/objects.html">Ajax data source (objects)</a></li>
<li><a href="../ajax/deep.html">Nested object data (objects)</a></li>
<li><a href="../ajax/objects_subarrays.html">Nested object data (arrays)</a></li>
<li><a href="../ajax/orthogonal-data.html">Orthogonal data</a></li>
<li><a href="../ajax/null_data_source.html">Generated content for a column</a></li>
<li><a href="../ajax/custom_data_property.html">Custom data source property</a></li>
<li><a href="../ajax/custom_data_flat.html">Flat array data source</a></li>
<li><a href="../ajax/defer_render.html">Deferred rendering for speed</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../server_side/index.html">Server-side</a></h3>
<ul class="toc">
<li><a href="../server_side/simple.html">Server-side processing</a></li>
<li><a href="../server_side/custom_vars.html">Custom HTTP variables</a></li>
<li><a href="../server_side/post.html">POST data</a></li>
<li><a href="../server_side/ids.html">Automatic addition of row ID attributes</a></li>
<li><a href="../server_side/object_data.html">Object data source</a></li>
<li><a href="../server_side/row_details.html">Row details</a></li>
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
</div>
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>
</div>
</section>
</body>
</html>

View File

@@ -19,13 +19,12 @@
<h1>DataTables example <span>Advanced initialisation</span></h1>
<div class="info">
<p>The configuration options offered by DataTables extend much further than the options shown in the
basic initialisation of this documentation. Through combinations of the options available and the use
of callbacks, DataTables is completely customisable and will fit into exactly what you need for your
table display.</p>
<p>The configuration options offered by DataTables extend much further than the options shown in the basic initialisation of this documentation. Through
combinations of the options available and the use of callbacks, DataTables is completely customisable and will fit into exactly what you need for your table
display.</p>
<p>This section shows some more advanced initialisation options. Keep in mind also that each example
can be combined with the other examples to get what you want!</p>
<p>This section shows some more advanced initialisation options. Keep in mind also that each example can be combined with the other examples to get what you
want!</p>
</div>
</section>
</div>
@@ -45,7 +44,9 @@
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -58,14 +59,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -22,7 +22,7 @@
$(document).ready(function() {
$('#example').dataTable( {
"language": {
"url": "../resources/de_DE.txt"
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json"
}
} );
} );
@@ -37,14 +37,12 @@ $(document).ready(function() {
<h1>DataTables example <span>Language file</span></h1>
<div class="info">
<p>As well as being able to pass language information to DataTables through the <a href=
"//datatables.net/reference/option/language"><code class="option" title=
"DataTables initialisation option">language<span>DT</span></code></a> initialisation option, you can
also store the language information in a file, which DataTables can load by Ajax using the <a href=
"//datatables.net/reference/option/language.url"><code class="option" title=
<p>As well as being able to pass language information to DataTables through the <a href="//datatables.net/reference/option/language"><code class="option" title=
"DataTables initialisation option">language<span>DT</span></code></a> initialisation option, you can also store the language information in a file, which
DataTables can load by Ajax using the <a href="//datatables.net/reference/option/language.url"><code class="option" title=
"DataTables initialisation option">language.url<span>DT</span></code></a> option.</p>
<p>The following example shows DataTables reading a German language file.</p>
<p>The following example shows DataTables reading a German language file which is hosted on the <a href="http://cdn.datatables.net">DataTables CDN</a></p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -540,17 +538,15 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;language&quot;: {
&quot;url&quot;: &quot;../resources/de_DE.txt&quot;
&quot;url&quot;: &quot;//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json&quot;
}
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -559,36 +555,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -611,8 +602,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -620,8 +610,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -636,7 +625,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li class="active"><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -679,14 +670,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -723,8 +711,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -732,10 +719,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -743,14 +728,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,17 +35,16 @@ $(document).ready(function() {
<h1>DataTables example <span>Page length options</span></h1>
<div class="info">
<p>It is possible to easily customise the options shown in the length menu (by default at the top left
of the table) using the <a href="//datatables.net/reference/option/lengthMenu"><code class="option"
title="DataTables initialisation option">lengthMenu<span>DT</span></code></a> initialisation
<p>It is possible to easily customise the options shown in the length menu (by default at the top left of the table) using the <a href=
"//datatables.net/reference/option/lengthMenu"><code class="option" title="DataTables initialisation option">lengthMenu<span>DT</span></code></a> initialisation
option.</p>
<p>This parameter can take one of two forms:</p>
<ul class="markdown">
<li>A 1D array of options which will be used for both the displayed option and the value, or</li>
<li>A 2D array in which the first array is used to define the value options and the second array
the displayed options (useful for language strings such as 'All').</li>
<li>A 2D array in which the first array is used to define the value options and the second array the displayed options (useful for language strings such as
'All').</li>
</ul>
<p>The example below shows a 2D array being used to include a "Show all" records option.</p>
@@ -544,15 +543,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;lengthMenu&quot;: [[10, 25, 50, -1], [10, 25, 50, &quot;All&quot;]]
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -561,36 +558,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -613,8 +605,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -622,8 +613,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -638,7 +628,9 @@ $(document).ready(function() {
<li class="active"><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -681,14 +673,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -725,8 +714,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -734,10 +722,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -745,14 +731,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -0,0 +1,771 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - Read HTML to data objects</title>
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="../resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="../resources/demo.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
$('#example').DataTable({
"columns": [
{ "data": "name" },
{ "data": "position" },
{ "data": "office" },
{ "data": "age" },
{ "data": "start_date" },
{ "data": "salary" }
]
});
} );
</script>
</head>
<body class="dt-example">
<div class="container">
<section>
<h1>DataTables example <span>Read HTML to data objects</span></h1>
<div class="info">
<p>When DataTables reads the table content from an HTML table (rather than an Ajax or Javascript data source), by default it will read the information in the table
into an array that DataTables stores internally. Each array element represents a column.</p>
<p>It can be very useful to have DataTables read the information into an object rather than an array, an option that can be triggered using the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a>
initialisation option to define how you want the data to be stored. Typically <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> is used with <a href="../ajax/objects.html">Ajax sourced data</a> to tell DataTables
where to read data from, but as can be seen here it also tells DataTables where to write the data to.</p>
<p>This ability to store data into an object can be very useful when working with the DataTables API after the table has been initialised.</p>
<p>In the example shown here, the data read from each row in the table is read into a Javascript object with the structure:</p>
<pre>
<code class="multiline language-js">{
"name": "...",
"position": "...",
"office": "...",
"age": "...",
"start_date": "...",
"salary": "..."
}
</code>
</pre>
<p>Please note that this feature requires DataTables 1.10.3 or newer.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Garrett Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
</tr>
<tr>
<td>Ashton Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
</tr>
<tr>
<td>Cedric Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>2012/03/29</td>
<td>$433,060</td>
</tr>
<tr>
<td>Airi Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
</tr>
<tr>
<td>Brielle Williamson</td>
<td>Integration Specialist</td>
<td>New York</td>
<td>61</td>
<td>2012/12/02</td>
<td>$372,000</td>
</tr>
<tr>
<td>Herrod Chandler</td>
<td>Sales Assistant</td>
<td>San Francisco</td>
<td>59</td>
<td>2012/08/06</td>
<td>$137,500</td>
</tr>
<tr>
<td>Rhona Davidson</td>
<td>Integration Specialist</td>
<td>Tokyo</td>
<td>55</td>
<td>2010/10/14</td>
<td>$327,900</td>
</tr>
<tr>
<td>Colleen Hurst</td>
<td>Javascript Developer</td>
<td>San Francisco</td>
<td>39</td>
<td>2009/09/15</td>
<td>$205,500</td>
</tr>
<tr>
<td>Sonya Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>2008/12/13</td>
<td>$103,600</td>
</tr>
<tr>
<td>Jena Gaines</td>
<td>Office Manager</td>
<td>London</td>
<td>30</td>
<td>2008/12/19</td>
<td>$90,560</td>
</tr>
<tr>
<td>Quinn Flynn</td>
<td>Support Lead</td>
<td>Edinburgh</td>
<td>22</td>
<td>2013/03/03</td>
<td>$342,000</td>
</tr>
<tr>
<td>Charde Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$470,600</td>
</tr>
<tr>
<td>Haley Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>2012/12/18</td>
<td>$313,500</td>
</tr>
<tr>
<td>Tatyana Fitzpatrick</td>
<td>Regional Director</td>
<td>London</td>
<td>19</td>
<td>2010/03/17</td>
<td>$385,750</td>
</tr>
<tr>
<td>Michael Silva</td>
<td>Marketing Designer</td>
<td>London</td>
<td>66</td>
<td>2012/11/27</td>
<td>$198,500</td>
</tr>
<tr>
<td>Paul Byrd</td>
<td>Chief Financial Officer (CFO)</td>
<td>New York</td>
<td>64</td>
<td>2010/06/09</td>
<td>$725,000</td>
</tr>
<tr>
<td>Gloria Little</td>
<td>Systems Administrator</td>
<td>New York</td>
<td>59</td>
<td>2009/04/10</td>
<td>$237,500</td>
</tr>
<tr>
<td>Bradley Greer</td>
<td>Software Engineer</td>
<td>London</td>
<td>41</td>
<td>2012/10/13</td>
<td>$132,000</td>
</tr>
<tr>
<td>Dai Rios</td>
<td>Personnel Lead</td>
<td>Edinburgh</td>
<td>35</td>
<td>2012/09/26</td>
<td>$217,500</td>
</tr>
<tr>
<td>Jenette Caldwell</td>
<td>Development Lead</td>
<td>New York</td>
<td>30</td>
<td>2011/09/03</td>
<td>$345,000</td>
</tr>
<tr>
<td>Yuri Berry</td>
<td>Chief Marketing Officer (CMO)</td>
<td>New York</td>
<td>40</td>
<td>2009/06/25</td>
<td>$675,000</td>
</tr>
<tr>
<td>Caesar Vance</td>
<td>Pre-Sales Support</td>
<td>New York</td>
<td>21</td>
<td>2011/12/12</td>
<td>$106,450</td>
</tr>
<tr>
<td>Doris Wilder</td>
<td>Sales Assistant</td>
<td>Sidney</td>
<td>23</td>
<td>2010/09/20</td>
<td>$85,600</td>
</tr>
<tr>
<td>Angelica Ramos</td>
<td>Chief Executive Officer (CEO)</td>
<td>London</td>
<td>47</td>
<td>2009/10/09</td>
<td>$1,200,000</td>
</tr>
<tr>
<td>Gavin Joyce</td>
<td>Developer</td>
<td>Edinburgh</td>
<td>42</td>
<td>2010/12/22</td>
<td>$92,575</td>
</tr>
<tr>
<td>Jennifer Chang</td>
<td>Regional Director</td>
<td>Singapore</td>
<td>28</td>
<td>2010/11/14</td>
<td>$357,650</td>
</tr>
<tr>
<td>Brenden Wagner</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>28</td>
<td>2011/06/07</td>
<td>$206,850</td>
</tr>
<tr>
<td>Fiona Green</td>
<td>Chief Operating Officer (COO)</td>
<td>San Francisco</td>
<td>48</td>
<td>2010/03/11</td>
<td>$850,000</td>
</tr>
<tr>
<td>Shou Itou</td>
<td>Regional Marketing</td>
<td>Tokyo</td>
<td>20</td>
<td>2011/08/14</td>
<td>$163,000</td>
</tr>
<tr>
<td>Michelle House</td>
<td>Integration Specialist</td>
<td>Sidney</td>
<td>37</td>
<td>2011/06/02</td>
<td>$95,400</td>
</tr>
<tr>
<td>Suki Burks</td>
<td>Developer</td>
<td>London</td>
<td>53</td>
<td>2009/10/22</td>
<td>$114,500</td>
</tr>
<tr>
<td>Prescott Bartlett</td>
<td>Technical Author</td>
<td>London</td>
<td>27</td>
<td>2011/05/07</td>
<td>$145,000</td>
</tr>
<tr>
<td>Gavin Cortez</td>
<td>Team Leader</td>
<td>San Francisco</td>
<td>22</td>
<td>2008/10/26</td>
<td>$235,500</td>
</tr>
<tr>
<td>Martena Mccray</td>
<td>Post-Sales support</td>
<td>Edinburgh</td>
<td>46</td>
<td>2011/03/09</td>
<td>$324,050</td>
</tr>
<tr>
<td>Unity Butler</td>
<td>Marketing Designer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/12/09</td>
<td>$85,675</td>
</tr>
<tr>
<td>Howard Hatfield</td>
<td>Office Manager</td>
<td>San Francisco</td>
<td>51</td>
<td>2008/12/16</td>
<td>$164,500</td>
</tr>
<tr>
<td>Hope Fuentes</td>
<td>Secretary</td>
<td>San Francisco</td>
<td>41</td>
<td>2010/02/12</td>
<td>$109,850</td>
</tr>
<tr>
<td>Vivian Harrell</td>
<td>Financial Controller</td>
<td>San Francisco</td>
<td>62</td>
<td>2009/02/14</td>
<td>$452,500</td>
</tr>
<tr>
<td>Timothy Mooney</td>
<td>Office Manager</td>
<td>London</td>
<td>37</td>
<td>2008/12/11</td>
<td>$136,200</td>
</tr>
<tr>
<td>Jackson Bradshaw</td>
<td>Director</td>
<td>New York</td>
<td>65</td>
<td>2008/09/26</td>
<td>$645,750</td>
</tr>
<tr>
<td>Olivia Liang</td>
<td>Support Engineer</td>
<td>Singapore</td>
<td>64</td>
<td>2011/02/03</td>
<td>$234,500</td>
</tr>
<tr>
<td>Bruno Nash</td>
<td>Software Engineer</td>
<td>London</td>
<td>38</td>
<td>2011/05/03</td>
<td>$163,500</td>
</tr>
<tr>
<td>Sakura Yamamoto</td>
<td>Support Engineer</td>
<td>Tokyo</td>
<td>37</td>
<td>2009/08/19</td>
<td>$139,575</td>
</tr>
<tr>
<td>Thor Walton</td>
<td>Developer</td>
<td>New York</td>
<td>61</td>
<td>2013/08/11</td>
<td>$98,540</td>
</tr>
<tr>
<td>Finn Camacho</td>
<td>Support Engineer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/07/07</td>
<td>$87,500</td>
</tr>
<tr>
<td>Serge Baldwin</td>
<td>Data Coordinator</td>
<td>Singapore</td>
<td>64</td>
<td>2012/04/09</td>
<td>$138,575</td>
</tr>
<tr>
<td>Zenaida Frank</td>
<td>Software Engineer</td>
<td>New York</td>
<td>63</td>
<td>2010/01/04</td>
<td>$125,250</td>
</tr>
<tr>
<td>Zorita Serrano</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>56</td>
<td>2012/06/01</td>
<td>$115,000</td>
</tr>
<tr>
<td>Jennifer Acosta</td>
<td>Junior Javascript Developer</td>
<td>Edinburgh</td>
<td>43</td>
<td>2013/02/01</td>
<td>$75,650</td>
</tr>
<tr>
<td>Cara Stevens</td>
<td>Sales Assistant</td>
<td>New York</td>
<td>46</td>
<td>2011/12/06</td>
<td>$145,600</td>
</tr>
<tr>
<td>Hermione Butler</td>
<td>Regional Director</td>
<td>London</td>
<td>47</td>
<td>2011/03/21</td>
<td>$356,250</td>
</tr>
<tr>
<td>Lael Greer</td>
<td>Systems Administrator</td>
<td>London</td>
<td>21</td>
<td>2009/02/27</td>
<td>$103,500</td>
</tr>
<tr>
<td>Jonas Alexander</td>
<td>Developer</td>
<td>San Francisco</td>
<td>30</td>
<td>2010/07/14</td>
<td>$86,500</td>
</tr>
<tr>
<td>Shad Decker</td>
<td>Regional Director</td>
<td>Edinburgh</td>
<td>51</td>
<td>2008/11/13</td>
<td>$183,000</td>
</tr>
<tr>
<td>Michael Bruce</td>
<td>Javascript Developer</td>
<td>Singapore</td>
<td>29</td>
<td>2011/06/27</td>
<td>$183,000</td>
</tr>
<tr>
<td>Donna Snider</td>
<td>Customer Support</td>
<td>New York</td>
<td>27</td>
<td>2011/01/25</td>
<td>$112,000</td>
</tr>
</tbody>
</table>
<ul class="tabs">
<li class="active">Javascript</li>
<li>HTML</li>
<li>CSS</li>
<li>Ajax</li>
<li>Server-side script</li>
</ul>
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').DataTable({
&quot;columns&quot;: [
{ &quot;data&quot;: &quot;name&quot; },
{ &quot;data&quot;: &quot;position&quot; },
{ &quot;data&quot;: &quot;office&quot; },
{ &quot;data&quot;: &quot;age&quot; },
{ &quot;data&quot;: &quot;start_date&quot; },
{ &quot;data&quot;: &quot;salary&quot; }
]
});
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
<li><a href="../../media/js/jquery.dataTables.js">../../media/js/jquery.dataTables.js</a></li>
</ul>
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
</div>
<section>
<div class="footer">
<div class="gradient"></div>
<div class="liner">
<h2>Other examples</h2>
<div class="toc">
<div class="toc-group">
<h3><a href="../basic_init/index.html">Basic initialisation</a></h3>
<ul class="toc">
<li><a href="../basic_init/zero_configuration.html">Zero configuration</a></li>
<li><a href="../basic_init/filter_only.html">Feature enable / disable</a></li>
<li><a href="../basic_init/table_sorting.html">Default ordering (sorting)</a></li>
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
<li><a href="../basic_init/alt_pagination.html">Alternative pagination</a></li>
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="./index.html">Advanced initialisation</a></h3>
<ul class="toc active">
<li><a href="./events_live.html">DOM / jQuery events</a></li>
<li><a href="./dt_events.html">DataTables events</a></li>
<li><a href="./column_render.html">Column rendering</a></li>
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li class="active"><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
<li><a href="./row_grouping.html">Row grouping</a></li>
<li><a href="./footer_callback.html">Footer callback</a></li>
<li><a href="./dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="./sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../styling/index.html">Styling</a></h3>
<ul class="toc">
<li><a href="../styling/display.html">Base style</a></li>
<li><a href="../styling/no-classes.html">Base style - no styling classes</a></li>
<li><a href="../styling/cell-border.html">Base style - cell borders</a></li>
<li><a href="../styling/compact.html">Base style - compact</a></li>
<li><a href="../styling/hover.html">Base style - hover</a></li>
<li><a href="../styling/order-column.html">Base style - order-column</a></li>
<li><a href="../styling/row-border.html">Base style - row borders</a></li>
<li><a href="../styling/stripe.html">Base style - stripe</a></li>
<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
<li><a href="../styling/foundation.html">Foundation</a></li>
<li><a href="../styling/jqueryUI.html">jQuery UI ThemeRoller</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../data_sources/index.html">Data sources</a></h3>
<ul class="toc">
<li><a href="../data_sources/dom.html">HTML (DOM) sourced data</a></li>
<li><a href="../data_sources/ajax.html">Ajax sourced data</a></li>
<li><a href="../data_sources/js_array.html">Javascript sourced data</a></li>
<li><a href="../data_sources/server_side.html">Server-side processing</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../api/index.html">API</a></h3>
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
<li><a href="../api/api_in_init.html">Using API in callbacks</a></li>
<li><a href="../api/tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../ajax/index.html">Ajax</a></h3>
<ul class="toc">
<li><a href="../ajax/simple.html">Ajax data source (arrays)</a></li>
<li><a href="../ajax/objects.html">Ajax data source (objects)</a></li>
<li><a href="../ajax/deep.html">Nested object data (objects)</a></li>
<li><a href="../ajax/objects_subarrays.html">Nested object data (arrays)</a></li>
<li><a href="../ajax/orthogonal-data.html">Orthogonal data</a></li>
<li><a href="../ajax/null_data_source.html">Generated content for a column</a></li>
<li><a href="../ajax/custom_data_property.html">Custom data source property</a></li>
<li><a href="../ajax/custom_data_flat.html">Flat array data source</a></li>
<li><a href="../ajax/defer_render.html">Deferred rendering for speed</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../server_side/index.html">Server-side</a></h3>
<ul class="toc">
<li><a href="../server_side/simple.html">Server-side processing</a></li>
<li><a href="../server_side/custom_vars.html">Custom HTTP variables</a></li>
<li><a href="../server_side/post.html">POST data</a></li>
<li><a href="../server_side/ids.html">Automatic addition of row ID attributes</a></li>
<li><a href="../server_side/object_data.html">Object data source</a></li>
<li><a href="../server_side/row_details.html">Row details</a></li>
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
<div class="toc-group">
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
</div>
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>
</div>
</section>
</body>
</html>

View File

@@ -27,7 +27,7 @@
$(document).ready(function() {
$('#example').dataTable( {
"createdRow": function ( row, data, index ) {
if ( data[5].replace(/[\$,]/g, '') * 1 > 4000 ) {
if ( data[5].replace(/[\$,]/g, '') * 1 > 150000 ) {
$('td', row).eq(5).addClass('highlight');
}
}
@@ -44,17 +44,13 @@ $(document).ready(function() {
<h1>DataTables example <span>Row created callback</span></h1>
<div class="info">
<p>The following example shows how a callback function can be used to format a particular row at draw
time. For each row that is generated for display, the <a href=
"//datatables.net/reference/option/createdRow"><code class="option" title=
"DataTables initialisation option">createdRow<span>DT</span></code></a> function is called once and
once only. It is passed the create row node which can then be modified.</p>
<p>The following example shows how a callback function can be used to format a particular row at draw time. For each row that is generated for display, the
<a href="//datatables.net/reference/option/createdRow"><code class="option" title="DataTables initialisation option">createdRow<span>DT</span></code></a> function
is called once and once only. It is passed the create row node which can then be modified.</p>
<p>In this case a trivial example of making the 'salary' column blue and bold by adding a CSS class to
the container cell if the salary is greater than $4,000. Note that <a href=
"//datatables.net/reference/option/columns.createdCell"><code class="option" title=
"DataTables initialisation option">columns.createdCell<span>DT</span></code></a> could also be used to
create exactly the same effect.</p>
<p>In this case a trivial example of making the 'salary' column blue and bold by adding a CSS class to the container cell if the salary is greater than $4,000.
Note that <a href="//datatables.net/reference/option/columns.createdCell"><code class="option" title=
"DataTables initialisation option">columns.createdCell<span>DT</span></code></a> could also be used to create exactly the same effect.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -550,19 +546,17 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;createdRow&quot;: function ( row, data, index ) {
if ( data[5].replace(/[\$,]/g, '') * 1 &gt; 4000 ) {
if ( data[5].replace(/[\$,]/g, '') * 1 &gt; 150000 ) {
$('td', row).eq(5).addClass('highlight');
}
}
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -571,39 +565,34 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">td.highlight {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">td.highlight {
font-weight: bold;
color: blue;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -626,8 +615,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -635,8 +623,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -651,7 +638,9 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li class="active"><a href="./row_callback.html">Row created callback</a></li>
@@ -694,14 +683,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -738,8 +724,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -747,10 +732,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -758,14 +741,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -70,17 +70,14 @@ $(document).ready(function() {
<h1>DataTables example <span>Row grouping</span></h1>
<div class="info">
<p>Although DataTables doesn't have row grouping built-in (picking one of the many methods available
would overly limit the DataTables core), it is most certainly possible to give the look and feel of row
grouping.</p>
<p>Although DataTables doesn't have row grouping built-in (picking one of the many methods available would overly limit the DataTables core), it is most certainly
possible to give the look and feel of row grouping.</p>
<p>In the example below the 'group' is the office location, which is based on the information in the
third column (which is set to hidden). The grouping indicator is added by the <a href=
"//datatables.net/reference/option/drawCallback"><code class="option" title=
"DataTables initialisation option">drawCallback<span>DT</span></code></a> function, which will parse
through the rows which are displayed, and enter a grouping TR element where a new group is found. A
<code>click</code> event handler is added for the grouping rows to allow the grouping order to be
restored as well as ordering by any other column.</p>
<p>In the example below the 'group' is the office location, which is based on the information in the third column (which is set to hidden). The grouping indicator
is added by the <a href="//datatables.net/reference/option/drawCallback"><code class="option" title=
"DataTables initialisation option">drawCallback<span>DT</span></code></a> function, which will parse through the rows which are displayed, and enter a grouping TR
element where a new group is found. A <code>click</code> event handler is added for the grouping rows to allow the grouping order to be restored as well as
ordering by any other column.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -576,8 +573,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable({
&quot;columnDefs&quot;: [
{ &quot;visible&quot;: false, &quot;targets&quot;: 2 }
@@ -613,8 +609,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -623,39 +618,34 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">tr.group,
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">tr.group,
tr.group:hover {
background-color: #ddd !important;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -678,8 +668,7 @@ tr.group:hover {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -687,8 +676,7 @@ tr.group:hover {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -703,7 +691,9 @@ tr.group:hover {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
@@ -746,14 +736,11 @@ tr.group:hover {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -790,8 +777,7 @@ tr.group:hover {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -799,10 +785,8 @@ tr.group:hover {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -810,14 +794,11 @@ tr.group:hover {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -42,12 +42,10 @@ $(document).ready(function() {
<h1>DataTables example <span>Order direction sequence control</span></h1>
<div class="info">
<p>At times you may wish to change the default ordering direction sequence for columns (some or all of
them) to be 'descending' rather than DataTables' default ascending. This can be done through the use of
the <a href="//datatables.net/reference/option/columns.orderSequence"><code class="option" title=
"DataTables initialisation option">columns.orderSequence<span>DT</span></code></a> initialisation
parameter. This parameter also allows you to limit the ordering to a single direction, or you could add
complex behaviour to the ordering interaction.</p>
<p>At times you may wish to change the default ordering direction sequence for columns (some or all of them) to be 'descending' rather than DataTables' default
ascending. This can be done through the use of the <a href="//datatables.net/reference/option/columns.orderSequence"><code class="option" title=
"DataTables initialisation option">columns.orderSequence<span>DT</span></code></a> initialisation parameter. This parameter also allows you to limit the ordering
to a single direction, or you could add complex behaviour to the ordering interaction.</p>
<p>The example below shows:</p>
@@ -60,9 +58,8 @@ $(document).ready(function() {
<li>Column 6 - default ordering</li>
</ul>
<p>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 use and
therefore applied across all columns.</p>
<p>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 use and therefore applied across all columns.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -558,8 +555,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;aoColumns&quot;: [
null,
@@ -572,8 +568,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -582,36 +577,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -634,8 +624,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -643,8 +632,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -659,15 +647,16 @@ $(document).ready(function() {
<li><a href="./length_menu.html">Page length options</a></li>
<li><a href="./dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./language_file.html">Language file</a></li>
<li><a href="./defaults.html">Setting defaults</a></li>
<li><a href="./row_callback.html">Row created callback</a></li>
<li><a href="./row_grouping.html">Row grouping</a></li>
<li><a href="./footer_callback.html">Footer callback</a></li>
<li><a href="./dom_toolbar.html">Custom toolbar elements</a></li>
<li class="active"><a href="./sort_direction_control.html">Order direction sequence
control</a></li>
<li class="active"><a href="./sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -703,14 +692,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -747,8 +733,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -756,10 +741,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -767,14 +750,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -44,30 +44,23 @@ $(document).ready(function() {
<h1>DataTables example <span>Flat array data source</span></h1>
<div class="info">
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the
<code>data</code> parameter of a returned object (e.g. <code>{ "data": [...] }</code>). This can easily
be change by using the <code>dataSrc</code> option of the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the <code>data</code> parameter of a returned object (e.g.
<code>{ "data": [...] }</code>). This can easily be change by using the <code>dataSrc</code> option of the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which
it can be used:</p>
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which it can be used:</p>
<ul class="markdown">
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in
the source object.</li>
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an
array.</li>
<li>As a function (e.g. <code>dataSrc: function(json) {}</code>) - a function can be used to
transform the data from one source format to another (for example you could convert from XML to a
Javascript object). The value returned from the function is used as the data for the table.</li>
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in the source object.</li>
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an array.</li>
<li>As a function (e.g. <code>dataSrc: function(json) {}</code>) - a function can be used to transform the data from one source format to another (for example
you could convert from XML to a Javascript object). The value returned from the function is used as the data for the table.</li>
</ul>
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
"option" title="DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as
an empty string. This tells DataTables that the JSON loaded is a plain array, not an object with an
array inside it as is the default.</p>
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as an empty string. This tells DataTables that the JSON loaded is a plain
array, not an object with an array inside it as is the default.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -104,8 +97,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: {
&quot;url&quot;: &quot;data/objects_root_array.txt&quot;,
@@ -122,8 +114,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -132,36 +123,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -184,8 +170,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -193,8 +178,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -207,19 +191,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -255,14 +238,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -299,8 +279,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -308,10 +287,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -319,14 +296,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -36,31 +36,23 @@ $(document).ready(function() {
<h1>DataTables example <span>Custom data source property</span></h1>
<div class="info">
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the
<code>data</code> parameter of a returned object (e.g. <code>{ "data": [...] }</code>). This can easily
be change by using the <code>dataSrc</code> option of the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
<p>When loading data from an Ajax source, by default, DataTables will look for the data to use in the <code>data</code> parameter of a returned object (e.g.
<code>{ "data": [...] }</code>). This can easily be change by using the <code>dataSrc</code> option of the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> initiation option.</p>
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which
it can be used:</p>
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> has a number of ways in which it can be used:</p>
<ul class="markdown">
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in
the source object.</li>
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an
array.</li>
<li>As a function (e.g. <code>dataSrc: function(json) {}</code>) - a function can be used to
transform the data from one source format to another (for example you could convert from XML to a
Javascript object). The value returned from the function is used as the data for the table.</li>
<li>As a string (e.g. <code>dataSrc: 'myData'</code>) - obtain data from a different property in the source object.</li>
<li>As an empty string (e.g. <code>dataSrc: ''</code>) - the data source is not an object but an array.</li>
<li>As a function (e.g. <code>dataSrc: function(json) {}</code>) - a function can be used to transform the data from one source format to another (for example
you could convert from XML to a Javascript object). The value returned from the function is used as the data for the table.</li>
</ul>
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
"option" title="DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as
a string to get the data from a different source property, in this case <code class="string" title=
"String">demo</code> but it could be any value, included a nested property by using standard dotted
Javascript object notation.</p>
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
"DataTables initialisation option">ajax.dataSrc<span>DT</span></code></a> being used as a string to get the data from a different source property, in this case
<code class="string" title="String">demo</code> but it could be any value, included a nested property by using standard dotted Javascript object notation.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -97,8 +89,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: {
&quot;url&quot;: &quot;data/arrays_custom_prop.txt&quot;,
@@ -107,8 +98,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -117,36 +107,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -169,8 +154,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -178,8 +162,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -192,19 +175,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -240,14 +222,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -266,8 +245,7 @@ $(document).ready(function() {
<li><a href="./objects_subarrays.html">Nested object data (arrays)</a></li>
<li><a href="./orthogonal-data.html">Orthogonal data</a></li>
<li><a href="./null_data_source.html">Generated content for a column</a></li>
<li class="active"><a href="./custom_data_property.html">Custom data source
property</a></li>
<li class="active"><a href="./custom_data_property.html">Custom data source property</a></li>
<li><a href="./custom_data_flat.html">Flat array data source</a></li>
<li><a href="./defer_render.html">Deferred rendering for speed</a></li>
</ul>
@@ -285,8 +263,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -294,10 +271,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -305,14 +280,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -42,22 +42,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Nested object data (objects)</span></h1>
<div class="info">
<p>DataTables has the ability to use data from almost data JSON data source through the use of the
<a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option. In its simplest case,
it can be used to read arbitrary object properties, but can also be extended to <em>n</em> levels of
nested objects / arrays through the use of standard Javascript dotted object notation. Each dot
(<code>.</code>) in the <a href="//datatables.net/reference/option/columns.data"><code class="option"
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option represents
another object level.</p>
<p>DataTables has the ability to use data from almost data JSON data source through the use of the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> option. In
its simplest case, it can be used to read arbitrary object properties, but can also be extended to <em>n</em> levels of nested objects / arrays through the use of
standard Javascript dotted object notation. Each dot (<code>.</code>) in the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option represents another object level.</p>
<p>In this example <code>hr.position</code> refers to the <code>position</code> property of the
<code>hr</code> object in the row's data source object, while <code>contact.0</code> refers to the
first element of the <code>contact</code> array. Any number of dots can be used to obtain deeply nested
data.</p>
<p>In this example <code>hr.position</code> refers to the <code>position</code> property of the <code>hr</code> object in the row's data source object, while
<code>contact.0</code> refers to the first element of the <code>contact</code> array. Any number of dots can be used to obtain deeply nested data.</p>
<p>The example below shows DataTables reading information for the columns from nested objects and
arrays, where the structure of the row's data source in this example is:</p>
<p>The example below shows DataTables reading information for the columns from nested objects and arrays, where the structure of the row's data source in this
example is:</p>
<pre>
<code class="multiline">{
"name": "Tiger Nixon",
@@ -109,8 +104,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;processing&quot;: true,
&quot;ajax&quot;: &quot;data/objects_deep.txt&quot;,
@@ -125,8 +119,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -135,36 +128,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -187,8 +175,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -196,8 +183,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -210,19 +196,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -258,14 +243,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -302,8 +284,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -311,10 +292,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -322,14 +301,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -34,21 +34,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Deferred rendering for speed</span></h1>
<div class="info">
<p>When working with large data sources, you might seek to improve the speed at which DataTables runs.
One method to do this is to make use of the built-in deferred rendering option in DataTables with the
<a href="//datatables.net/reference/option/deferRender"><code class="option" title=
<p>When working with large data sources, you might seek to improve the speed at which DataTables runs. One method to do this is to make use of the built-in
deferred rendering option in DataTables with the <a href="//datatables.net/reference/option/deferRender"><code class="option" title=
"DataTables initialisation option">deferRender<span>DT</span></code></a> option.</p>
<p>When deferred rendering is enabled, rather than having DataTables create all <code class="tag"
title="HTML tag">TR</code> and <code class="tag" title="HTML tag">TD</code> nodes required for the
table when the data is loaded, DataTables will only create the nodes required for each individual row
at the time of that row being drawn on the page (these nodes are then retained in case they are needed
again so they aren't created multiple times). This can give a significant performance increase, since a
lot less work is done at initialisation time.</p>
<p>When deferred rendering is enabled, rather than having DataTables create all <code class="tag" title="HTML tag">TR</code> and <code class="tag" title=
"HTML tag">TD</code> nodes required for the table when the data is loaded, DataTables will only create the nodes required for each individual row at the time of
that row being drawn on the page (these nodes are then retained in case they are needed again so they aren't created multiple times). This can give a significant
performance increase, since a lot less work is done at initialisation time.</p>
<p>The example below shows DataTables with deferred rendering enabled. For this small example you'll
likely notice no difference, but larger tables can benefit significantly from simply enabling this
parameter.</p>
<p>The example below shows DataTables with deferred rendering enabled. For this small example you'll likely notice no difference, but larger tables can benefit
significantly from simply enabling this parameter.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -85,16 +81,14 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: &quot;data/arrays.txt&quot;,
&quot;deferRender&quot;: true
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -103,36 +97,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -155,8 +144,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -164,8 +152,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -178,19 +165,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -226,14 +212,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -270,8 +253,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -279,10 +261,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -290,14 +270,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -19,14 +19,11 @@
<h1>DataTables example <span>Ajax sourced data</span></h1>
<div class="info">
<p>DataTables can read data from a server via Ajax, while still performing searching, ordering, paging
etc on the client-side. This is done through use of the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> option, which has a number of options
to customise how the data is retrieved from the server.</p>
<p>DataTables can read data from a server via Ajax, while still performing searching, ordering, paging etc on the client-side. This is done through use of the
<a href="//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option, which has a
number of options to customise how the data is retrieved from the server.</p>
<p>The examples in this section demonstrate the use of Ajax loading data in DataTables, with
client-side processing.</p>
<p>The examples in this section demonstrate the use of Ajax loading data in DataTables, with client-side processing.</p>
</div>
</section>
</div>
@@ -54,14 +51,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,32 +43,24 @@ $(document).ready(function() {
<h1>DataTables example <span>Generated content for a column</span></h1>
<div class="info">
<p>In some tables you might wish to have some content generated automatically. This can be done in a
number of ways:</p>
<p>In some tables you might wish to have some content generated automatically. This can be done in a number of ways:</p>
<ul class="markdown">
<li><a href="//datatables.net/reference/option/columns.render"><code class="option" title=
"DataTables initialisation option">columns.render<span>DT</span></code></a> for content that is
dynamic (i.e. based upon the row's data)</li>
"DataTables initialisation option">columns.render<span>DT</span></code></a> for content that is dynamic (i.e. based upon the row's data)</li>
<li><a href="//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> for static
content (i.e. simple strings)</li>
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> for static content (i.e. simple strings)</li>
</ul>
<p>This examples shows the use of <a href=
"//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> to create a
<em>button</em> element in the last column of the table. A simple jQuery <code>click</code> event
listener is used to watch for clicks on the row, and when activated uses the <a href=
"//datatables.net/reference/api/row().data()"><code class="api" title=
"DataTables API method">row().data()<span>DT</span></code></a> method to get the data for the row and
show a bit of information about it in an <code>alert</code> box. This is a simple use case, but it can
be built up to be arbitrarily complex.</p>
<p>This examples shows the use of <a href="//datatables.net/reference/option/columns.defaultContent"><code class="option" title=
"DataTables initialisation option">columns.defaultContent<span>DT</span></code></a> to create a <em>button</em> element in the last column of the table. A simple
jQuery <code>click</code> event listener is used to watch for clicks on the row, and when activated uses the <a href=
"//datatables.net/reference/api/row().data()"><code class="api" title="DataTables API method">row().data()<span>DT</span></code></a> method to get the data for the
row and show a bit of information about it in an <code>alert</code> box. This is a simple use case, but it can be built up to be arbitrarily complex.</p>
<p>Note also that the <a href="//datatables.net/reference/option/columns.data"><code class="option"
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option for the column
has been set to <code>null</code> to indicate that the column has no information that should be
obtained data source object.</p>
<p>Note also that the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option for the column has been set to <code>null</code> to indicate that the column has
no information that should be obtained data source object.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -105,8 +97,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable( {
&quot;ajax&quot;: &quot;data/arrays.txt&quot;,
&quot;columnDefs&quot;: [ {
@@ -122,8 +113,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -132,36 +122,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -184,8 +169,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -193,8 +177,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -207,19 +190,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -255,14 +237,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -280,8 +259,7 @@ $(document).ready(function() {
<li><a href="./deep.html">Nested object data (objects)</a></li>
<li><a href="./objects_subarrays.html">Nested object data (arrays)</a></li>
<li><a href="./orthogonal-data.html">Orthogonal data</a></li>
<li class="active"><a href="./null_data_source.html">Generated content for a
column</a></li>
<li class="active"><a href="./null_data_source.html">Generated content for a column</a></li>
<li><a href="./custom_data_property.html">Custom data source property</a></li>
<li><a href="./custom_data_flat.html">Flat array data source</a></li>
<li><a href="./defer_render.html">Deferred rendering for speed</a></li>
@@ -300,8 +278,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -309,10 +286,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -320,14 +295,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -41,19 +41,16 @@ $(document).ready(function() {
<h1>DataTables example <span>Ajax data source (objects)</span></h1>
<div class="info">
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for
rows in the table. However, this isn't always useful, and you may wish to have DataTables use objects
as the data source for each row (i.e. each row has its data described by an object) as this can make
working with the data much more understandable, particularly if you are using the API and you don't
need to keep track of array indexes.</p>
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for rows in the table. However, this isn't always useful, and you
may wish to have DataTables use objects as the data source for each row (i.e. each row has its data described by an object) as this can make working with the data
much more understandable, particularly if you are using the API and you don't need to keep track of array indexes.</p>
<p>This can be done quite simply by using the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell
DataTables which property to use from the data source object for each column.</p>
<p>This can be done quite simply by using the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell DataTables which property to use from the data source object
for each column.</p>
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the
table. The structure of the row's data source in this example is:</p>
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the table. The structure of the row's data source in this example
is:</p>
<pre>
<code class="multiline">{
"name": "Tiger Nixon",
@@ -101,8 +98,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: &quot;data/objects.txt&quot;,
&quot;columns&quot;: [
@@ -116,8 +112,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -126,36 +121,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -178,8 +168,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -187,8 +176,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -201,19 +189,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -249,14 +236,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -293,8 +277,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -302,10 +285,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -313,14 +294,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -41,34 +41,27 @@ $(document).ready(function() {
<h1>DataTables example <span>Nested object data (arrays)</span></h1>
<div class="info">
<p>The information read from an Ajax data source can be arbitrarily complex, but still be displayed by
DataTables through the <a href="//datatables.net/reference/option/columns.data"><code class="option"
title="DataTables initialisation option">columns.data<span>DT</span></code></a> option, which is
particularly useful for working with JSON feeds in an already defined format.</p>
<p>The information read from an Ajax data source can be arbitrarily complex, but still be displayed by DataTables through the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> option, which
is particularly useful for working with JSON feeds in an already defined format.</p>
<p>The <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option has the ability to
read information not only from objects, but also from arrays using the same dotted object syntax as for
objects. In addition to this, when working with an array data source <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> can process the data to
combine and display the data in simple forms (more complex forms can be defined by using <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> as a function).</p>
"DataTables initialisation option">columns.data<span>DT</span></code></a> option has the ability to read information not only from objects, but also from arrays
using the same dotted object syntax as for objects. In addition to this, when working with an array data source <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> can process
the data to combine and display the data in simple forms (more complex forms can be defined by using <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> as a
function).</p>
<p>This example shows two different aspects of using <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
<p>This example shows two different aspects of using <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> to read arrays:</p>
<ul class="markdown">
<li>The <em>Name</em> column is sourced from an array of two elements (first and last name), which
are automatically concatenated together. This is done by using array bracket syntax, with the
characters between the brackets being used as the glue between elements (e.g. <code>name[,
]</code>).</li>
<li>The <em>Position</em>, <em>Start date</em> and <em>Salary</em> columns are read directly from
array elements using dotted object notation (e.g. <code>hr.0</code>). Note that the order in which
the data can be used in the columns does not have to match the order in which it is defined in the
data source. The structure of the row's data source in this example is:</li>
<li>The <em>Name</em> column is sourced from an array of two elements (first and last name), which are automatically concatenated together. This is done by
using array bracket syntax, with the characters between the brackets being used as the glue between elements (e.g. <code>name[, ]</code>).</li>
<li>The <em>Position</em>, <em>Start date</em> and <em>Salary</em> columns are read directly from array elements using dotted object notation (e.g.
<code>hr.0</code>). Note that the order in which the data can be used in the columns does not have to match the order in which it is defined in the data
source. The structure of the row's data source in this example is:</li>
</ul>
<pre>
<code class="multiline">{
@@ -122,8 +115,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: &quot;data/objects_subarrays.txt&quot;,
&quot;columns&quot;: [
@@ -137,8 +129,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -147,36 +138,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -199,8 +185,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -208,8 +193,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -222,19 +206,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -270,14 +253,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -314,8 +294,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -323,10 +302,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -334,14 +311,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -44,19 +44,16 @@ $(document).ready(function() {
<h1>DataTables example <span>Orthogonal data</span></h1>
<div class="info">
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for
rows in the table. However, this isn't always useful, and you may wish to have DataTables use objects
as the data source for each row (i.e. each row has its data described by an object) as this can make
working with the data much more understandable, particularly if you are using the API and you don't
need to keep track of array indexes.</p>
<p>To try and make life easy, by default, DataTables expects arrays to be used as the data source for rows in the table. However, this isn't always useful, and you
may wish to have DataTables use objects as the data source for each row (i.e. each row has its data described by an object) as this can make working with the data
much more understandable, particularly if you are using the API and you don't need to keep track of array indexes.</p>
<p>This can be done quite simply by using the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell
DataTables which property to use from the data source object for each column.</p>
<p>This can be done quite simply by using the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option which you use to tell DataTables which property to use from the data source object
for each column.</p>
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the
table. The structure of the row's data source in this example is:</p>
<p>In this example the Ajax source returns an array of objects, which DataTables uses to display the table. The structure of the row's data source in this example
is:</p>
<pre>
<code class="multiline">{
"name": "Tiger Nixon",
@@ -107,8 +104,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
ajax: &quot;data/orthogonal.txt&quot;,
columns: [
@@ -125,8 +121,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -135,36 +130,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -187,8 +177,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -196,8 +185,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -210,19 +198,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -258,14 +245,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -302,8 +286,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -311,10 +294,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -322,14 +303,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,28 +33,20 @@ $(document).ready(function() {
<h1>DataTables example <span>Ajax data source (arrays)</span></h1>
<div class="info">
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by
Ajax. This can be done, in its most simple form, by setting the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> option to the address of the JSON
data source.</p>
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by Ajax. This can be done, in its most simple form, by setting
the <a href="//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option to the
address of the JSON data source.</p>
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> option also allows for more advanced
configuration such as altering how the Ajax request is made. See the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> documentation or the other Ajax
examples for DataTables for further information.</p>
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option also
allows for more advanced configuration such as altering how the Ajax request is made. See the <a href="//datatables.net/reference/option/ajax"><code class="option"
title="DataTables initialisation option">ajax<span>DT</span></code></a> documentation or the other Ajax examples for DataTables for further information.</p>
<p>By default DataTables will assume that an array data source is to be used and will read the
information to be displayed in each column from the row's array using the column index, making working
with arrays very simple (note that this can be changed, or objects used may using the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option, shown in other
examples).</p>
<p>By default DataTables will assume that an array data source is to be used and will read the information to be displayed in each column from the row's array
using the column index, making working with arrays very simple (note that this can be changed, or objects used may using the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> option, shown
in other examples).</p>
<p>The example below shows DataTables loading data for a table from arrays as the data source, where
the structure of the row's data source in this example is:</p>
<p>The example below shows DataTables loading data for a table from arrays as the data source, where the structure of the row's data source in this example is:</p>
<pre>
<code class="multiline">[
"Tiger Nixon",
@@ -102,15 +94,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: &quot;data/arrays.txt&quot;
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -119,36 +109,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -171,8 +156,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -180,8 +164,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -194,19 +177,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -242,14 +224,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -286,8 +265,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -295,10 +273,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -306,14 +282,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -49,17 +49,13 @@ $(document).ready(function() {
<h1>DataTables example <span>Add rows</span></h1>
<div class="info">
<p>New rows can be added to a DataTable very easily using the <a href=
"//datatables.net/reference/api/row.add()"><code class="api" title=
"DataTables API method">row.add()<span>DT</span></code></a> API method. Simply call the API function
with the data that is to be used for the new row (be it an array or object). Multiple rows can be added
using the <a href="//datatables.net/reference/api/rows.add()"><code class="api" title=
<p>New rows can be added to a DataTable very easily using the <a href="//datatables.net/reference/api/row.add()"><code class="api" title=
"DataTables API method">row.add()<span>DT</span></code></a> API method. Simply call the API function with the data that is to be used for the new row (be it an
array or object). Multiple rows can be added using the <a href="//datatables.net/reference/api/rows.add()"><code class="api" title=
"DataTables API method">rows.add()<span>DT</span></code></a> method (note the plural).</p>
<p>Note that in order to see the new row in the table you must call the <a href=
"//datatables.net/reference/api/draw()"><code class="api" title=
"DataTables API method">draw()<span>DT</span></code></a> method, which is easily done through the
chaining that the DataTables API makes use of.</p>
<p>Note that in order to see the new row in the table you must call the <a href="//datatables.net/reference/api/draw()"><code class="api" title=
"DataTables API method">draw()<span>DT</span></code></a> method, which is easily done through the chaining that the DataTables API makes use of.</p>
<p>This example shows a single row being added each time the button below is clicked upon.</p>
</div><button id="addRow">Add new row</button>
@@ -96,8 +92,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var t = $('#example').DataTable();
var counter = 1;
@@ -117,8 +112,7 @@ $(document).ready(function() {
$('#addRow').click();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -127,36 +121,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -179,8 +168,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -188,8 +176,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -202,19 +189,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -250,8 +236,7 @@ $(document).ready(function() {
<ul class="toc active">
<li class="active"><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -292,8 +277,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -301,10 +285,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -312,14 +294,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -40,26 +40,20 @@ $(document).ready(function() {
<h1>DataTables example <span>Using API in callbacks</span></h1>
<div class="info">
<p>There are times when you may wish to call API functions inside the DataTables callback functions
(for example <a href="//datatables.net/reference/option/initComplete"><code class="option" title=
"DataTables initialisation option">initComplete<span>DT</span></code></a>, <a href=
"//datatables.net/reference/option/rowCallback"><code class="option" title=
"DataTables initialisation option">rowCallback<span>DT</span></code></a> etc). The complicating issue
with this is that the object hasn't fully initialised, so you can't assign the result to a variable and
then use that variable in the callback. However, all of DataTables' callback functions are executed in
the scope of the DataTable instance, so you can use the Javascript special variable <code>this</code>
to access the API (<code>this.api()</code> will give an API instance) as <code>this</code> is the
<code class="tag" title="HTML tag">table</code> node.</p>
<p>There are times when you may wish to call API functions inside the DataTables callback functions (for example <a href=
"//datatables.net/reference/option/initComplete"><code class="option" title="DataTables initialisation option">initComplete<span>DT</span></code></a>, <a href=
"//datatables.net/reference/option/rowCallback"><code class="option" title="DataTables initialisation option">rowCallback<span>DT</span></code></a> etc). The
complicating issue with this is that the object hasn't fully initialised, so you can't assign the result to a variable and then use that variable in the callback.
However, all of DataTables' callback functions are executed in the scope of the DataTable instance, so you can use the Javascript special variable
<code>this</code> to access the API (<code>this.api()</code> will give an API instance) as <code>this</code> is the <code class="tag" title="HTML tag">table</code>
node.</p>
<p>In this example you will be able to see that the <a href=
"//datatables.net/reference/api/%24()"><code class="api" title=
"DataTables API method">$()<span>DT</span></code></a> method is used to get all cell nodes in the
table's body and then act on them (in this case adding a click event). The action here is to apply a
filter to the table with the value of what is in each cell.</p>
<p>In this example you will be able to see that the <a href="//datatables.net/reference/api/%24()"><code class="api" title=
"DataTables API method">$()<span>DT</span></code></a> method is used to get all cell nodes in the table's body and then act on them (in this case adding a click
event). The action here is to apply a filter to the table with the value of what is in each cell.</p>
<p>It is also worth noting that this same effect could be achieved by attaching a delegated click event
after the table has been initialised - but the example shows the use of the API inside the
callbacks!</p>
<p>It is also worth noting that this same effect could be achieved by attaching a delegated click event after the table has been initialised - but the example
shows the use of the API inside the callbacks!</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -555,8 +549,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;initComplete&quot;: function () {
var api = this.api();
@@ -567,8 +560,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -577,36 +569,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -629,8 +616,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -638,8 +624,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -652,19 +637,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -700,8 +684,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -742,8 +725,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -751,10 +733,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -762,14 +742,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -46,23 +46,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Index column</span></h1>
<div class="info">
<p>A fairly common requirement for highly interactive tables which are displayed on the web is to have
a column which with a 'counter' for the row number. 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.</p>
<p>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.</p>
<p>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 <a href=
"//datatables.net/reference/event/order"><code class="event" title=
"DataTables event">order<span>DT</span></code></a> and <a href=
"//datatables.net/reference/event/search"><code class="event" title=
"DataTables event">search<span>DT</span></code></a> events emitted by the table. When these events are
detected the <a href="//datatables.net/reference/api/column().nodes()"><code class="api" title=
"DataTables API method">column().nodes()<span>DT</span></code></a> method is used to get the TD/TH
nodes for the target column and the <code>each()</code> helper function used to iterate over each,
which have their contents updated as needed. Note that the <code>filter</code> and <code>order</code>
options are using in the <a href="//datatables.net/reference/api/column()"><code class="api" title=
"DataTables API method">column()<span>DT</span></code></a> method to get the nodes in the current order
and with the currently applied filter.</p>
<p>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 <a href="//datatables.net/reference/event/order"><code class="event" title="DataTables event">order<span>DT</span></code></a> and
<a href="//datatables.net/reference/event/search"><code class="event" title="DataTables event">search<span>DT</span></code></a> events emitted by the table. When
these events are detected the <a href="//datatables.net/reference/api/column().nodes()"><code class="api" title=
"DataTables API method">column().nodes()<span>DT</span></code></a> method is used to get the TD/TH nodes for the target column and the <code>each()</code> helper
function used to iterate over each, which have their contents updated as needed. Note that the <code>filter</code> and <code>order</code> options are using in the
<a href="//datatables.net/reference/api/column()"><code class="api" title="DataTables API method">column()<span>DT</span></code></a> method to get the nodes in the
current order and with the currently applied filter.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -558,8 +552,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var t = $('#example').DataTable( {
&quot;columnDefs&quot;: [ {
&quot;searchable&quot;: false,
@@ -576,8 +569,7 @@ $(document).ready(function() {
} ).draw();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -586,36 +578,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -638,8 +625,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -647,8 +633,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -661,19 +646,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -709,8 +693,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -751,8 +734,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -760,10 +742,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -771,14 +751,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -42,21 +42,16 @@ $(document).ready(function() {
<h1>DataTables example <span>Form inputs</span></h1>
<div class="info">
<p>In order to perform paging, ordering, searching etc, DataTables can remove rows and cells from the
document (i.e. those rows / cells which are not needed are not inserted into the document). This
increases performance and compatibility, however, it means that submitting forms which span multiple
pages requires a little bit of additional work to get the information that is not in the document any
longer.</p>
<p>In order to perform paging, ordering, searching etc, DataTables can remove rows and cells from the document (i.e. those rows / cells which are not needed are
not inserted into the document). This increases performance and compatibility, however, it means that submitting forms which span multiple pages requires a little
bit of additional work to get the information that is not in the document any longer.</p>
<p>The <a href="//datatables.net/reference/api/%24()"><code class="api" title=
"DataTables API method">$()<span>DT</span></code></a> method can be used to get nodes from the document
regardless of paging, ordering etc. This example shows <a href=
"//datatables.net/reference/api/%24()"><code class="api" title=
"DataTables API method">$()<span>DT</span></code></a> being used to get all <code class="tag" title=
"HTML tag">input</code> elements from the table.</p>
<p>The <a href="//datatables.net/reference/api/%24()"><code class="api" title="DataTables API method">$()<span>DT</span></code></a> method can be used to get nodes
from the document regardless of paging, ordering etc. This example shows <a href="//datatables.net/reference/api/%24()"><code class="api" title=
"DataTables API method">$()<span>DT</span></code></a> being used to get all <code class="tag" title="HTML tag">input</code> elements from the table.</p>
<p>In the example a simple <code>alert()</code> is used to show the information from the form, but an
Ajax call to the server with the form data could easily be performed.</p>
<p>In the example a simple <code>alert()</code> is used to show the information from the form, but an Ajax call to the server with the form data could easily be
performed.</p>
</div><button type="submit">Submit form</button>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -134,8 +129,7 @@ $(document).ready(function() {
<tr>
<td>Ashton Cox</td>
<td><input type="text" id="row-3-age" name="row-3-age" value="66"></td>
<td><input type="text" id="row-3-position" name="row-3-position" value=
"Junior Technical Author"></td>
<td><input type="text" id="row-3-position" name="row-3-position" value="Junior Technical Author"></td>
<td><select size="1" id="row-3-office" name="row-3-office">
<option value="Edinburgh">
Edinburgh
@@ -161,8 +155,7 @@ $(document).ready(function() {
<tr>
<td>Cedric Kelly</td>
<td><input type="text" id="row-4-age" name="row-4-age" value="22"></td>
<td><input type="text" id="row-4-position" name="row-4-position" value=
"Senior Javascript Developer"></td>
<td><input type="text" id="row-4-position" name="row-4-position" value="Senior Javascript Developer"></td>
<td><select size="1" id="row-4-office" name="row-4-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -214,8 +207,7 @@ $(document).ready(function() {
<tr>
<td>Brielle Williamson</td>
<td><input type="text" id="row-6-age" name="row-6-age" value="61"></td>
<td><input type="text" id="row-6-position" name="row-6-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-6-position" name="row-6-position" value="Integration Specialist"></td>
<td><select size="1" id="row-6-office" name="row-6-office">
<option value="Edinburgh">
Edinburgh
@@ -267,8 +259,7 @@ $(document).ready(function() {
<tr>
<td>Rhona Davidson</td>
<td><input type="text" id="row-8-age" name="row-8-age" value="55"></td>
<td><input type="text" id="row-8-position" name="row-8-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-8-position" name="row-8-position" value="Integration Specialist"></td>
<td><select size="1" id="row-8-office" name="row-8-office">
<option value="Edinburgh">
Edinburgh
@@ -294,8 +285,7 @@ $(document).ready(function() {
<tr>
<td>Colleen Hurst</td>
<td><input type="text" id="row-9-age" name="row-9-age" value="39"></td>
<td><input type="text" id="row-9-position" name="row-9-position" value=
"Javascript Developer"></td>
<td><input type="text" id="row-9-position" name="row-9-position" value="Javascript Developer"></td>
<td><select size="1" id="row-9-office" name="row-9-office">
<option value="Edinburgh">
Edinburgh
@@ -321,8 +311,7 @@ $(document).ready(function() {
<tr>
<td>Sonya Frost</td>
<td><input type="text" id="row-10-age" name="row-10-age" value="23"></td>
<td><input type="text" id="row-10-position" name="row-10-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-10-position" name="row-10-position" value="Software Engineer"></td>
<td><select size="1" id="row-10-office" name="row-10-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -400,8 +389,7 @@ $(document).ready(function() {
<tr>
<td>Charde Marshall</td>
<td><input type="text" id="row-13-age" name="row-13-age" value="36"></td>
<td><input type="text" id="row-13-position" name="row-13-position" value=
"Regional Director"></td>
<td><input type="text" id="row-13-position" name="row-13-position" value="Regional Director"></td>
<td><select size="1" id="row-13-office" name="row-13-office">
<option value="Edinburgh">
Edinburgh
@@ -427,8 +415,7 @@ $(document).ready(function() {
<tr>
<td>Haley Kennedy</td>
<td><input type="text" id="row-14-age" name="row-14-age" value="43"></td>
<td><input type="text" id="row-14-position" name="row-14-position" value=
"Senior Marketing Designer"></td>
<td><input type="text" id="row-14-position" name="row-14-position" value="Senior Marketing Designer"></td>
<td><select size="1" id="row-14-office" name="row-14-office">
<option value="Edinburgh">
Edinburgh
@@ -454,8 +441,7 @@ $(document).ready(function() {
<tr>
<td>Tatyana Fitzpatrick</td>
<td><input type="text" id="row-15-age" name="row-15-age" value="19"></td>
<td><input type="text" id="row-15-position" name="row-15-position" value=
"Regional Director"></td>
<td><input type="text" id="row-15-position" name="row-15-position" value="Regional Director"></td>
<td><select size="1" id="row-15-office" name="row-15-office">
<option value="Edinburgh">
Edinburgh
@@ -481,8 +467,7 @@ $(document).ready(function() {
<tr>
<td>Michael Silva</td>
<td><input type="text" id="row-16-age" name="row-16-age" value="66"></td>
<td><input type="text" id="row-16-position" name="row-16-position" value=
"Marketing Designer"></td>
<td><input type="text" id="row-16-position" name="row-16-position" value="Marketing Designer"></td>
<td><select size="1" id="row-16-office" name="row-16-office">
<option value="Edinburgh">
Edinburgh
@@ -508,8 +493,7 @@ $(document).ready(function() {
<tr>
<td>Paul Byrd</td>
<td><input type="text" id="row-17-age" name="row-17-age" value="64"></td>
<td><input type="text" id="row-17-position" name="row-17-position" value=
"Chief Financial Officer (CFO)"></td>
<td><input type="text" id="row-17-position" name="row-17-position" value="Chief Financial Officer (CFO)"></td>
<td><select size="1" id="row-17-office" name="row-17-office">
<option value="Edinburgh">
Edinburgh
@@ -535,8 +519,7 @@ $(document).ready(function() {
<tr>
<td>Gloria Little</td>
<td><input type="text" id="row-18-age" name="row-18-age" value="59"></td>
<td><input type="text" id="row-18-position" name="row-18-position" value=
"Systems Administrator"></td>
<td><input type="text" id="row-18-position" name="row-18-position" value="Systems Administrator"></td>
<td><select size="1" id="row-18-office" name="row-18-office">
<option value="Edinburgh">
Edinburgh
@@ -562,8 +545,7 @@ $(document).ready(function() {
<tr>
<td>Bradley Greer</td>
<td><input type="text" id="row-19-age" name="row-19-age" value="41"></td>
<td><input type="text" id="row-19-position" name="row-19-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-19-position" name="row-19-position" value="Software Engineer"></td>
<td><select size="1" id="row-19-office" name="row-19-office">
<option value="Edinburgh">
Edinburgh
@@ -615,8 +597,7 @@ $(document).ready(function() {
<tr>
<td>Jenette Caldwell</td>
<td><input type="text" id="row-21-age" name="row-21-age" value="30"></td>
<td><input type="text" id="row-21-position" name="row-21-position" value=
"Development Lead"></td>
<td><input type="text" id="row-21-position" name="row-21-position" value="Development Lead"></td>
<td><select size="1" id="row-21-office" name="row-21-office">
<option value="Edinburgh">
Edinburgh
@@ -642,8 +623,7 @@ $(document).ready(function() {
<tr>
<td>Yuri Berry</td>
<td><input type="text" id="row-22-age" name="row-22-age" value="40"></td>
<td><input type="text" id="row-22-position" name="row-22-position" value=
"Chief Marketing Officer (CMO)"></td>
<td><input type="text" id="row-22-position" name="row-22-position" value="Chief Marketing Officer (CMO)"></td>
<td><select size="1" id="row-22-office" name="row-22-office">
<option value="Edinburgh">
Edinburgh
@@ -669,8 +649,7 @@ $(document).ready(function() {
<tr>
<td>Caesar Vance</td>
<td><input type="text" id="row-23-age" name="row-23-age" value="21"></td>
<td><input type="text" id="row-23-position" name="row-23-position" value=
"Pre-Sales Support"></td>
<td><input type="text" id="row-23-position" name="row-23-position" value="Pre-Sales Support"></td>
<td><select size="1" id="row-23-office" name="row-23-office">
<option value="Edinburgh">
Edinburgh
@@ -696,8 +675,7 @@ $(document).ready(function() {
<tr>
<td>Doris Wilder</td>
<td><input type="text" id="row-24-age" name="row-24-age" value="23"></td>
<td><input type="text" id="row-24-position" name="row-24-position" value=
"Sales Assistant"></td>
<td><input type="text" id="row-24-position" name="row-24-position" value="Sales Assistant"></td>
<td><select size="1" id="row-24-office" name="row-24-office">
<option value="Edinburgh">
Edinburgh
@@ -723,8 +701,7 @@ $(document).ready(function() {
<tr>
<td>Angelica Ramos</td>
<td><input type="text" id="row-25-age" name="row-25-age" value="47"></td>
<td><input type="text" id="row-25-position" name="row-25-position" value=
"Chief Executive Officer (CEO)"></td>
<td><input type="text" id="row-25-position" name="row-25-position" value="Chief Executive Officer (CEO)"></td>
<td><select size="1" id="row-25-office" name="row-25-office">
<option value="Edinburgh">
Edinburgh
@@ -776,8 +753,7 @@ $(document).ready(function() {
<tr>
<td>Jennifer Chang</td>
<td><input type="text" id="row-27-age" name="row-27-age" value="28"></td>
<td><input type="text" id="row-27-position" name="row-27-position" value=
"Regional Director"></td>
<td><input type="text" id="row-27-position" name="row-27-position" value="Regional Director"></td>
<td><select size="1" id="row-27-office" name="row-27-office">
<option value="Edinburgh">
Edinburgh
@@ -803,8 +779,7 @@ $(document).ready(function() {
<tr>
<td>Brenden Wagner</td>
<td><input type="text" id="row-28-age" name="row-28-age" value="28"></td>
<td><input type="text" id="row-28-position" name="row-28-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-28-position" name="row-28-position" value="Software Engineer"></td>
<td><select size="1" id="row-28-office" name="row-28-office">
<option value="Edinburgh">
Edinburgh
@@ -830,8 +805,7 @@ $(document).ready(function() {
<tr>
<td>Fiona Green</td>
<td><input type="text" id="row-29-age" name="row-29-age" value="48"></td>
<td><input type="text" id="row-29-position" name="row-29-position" value=
"Chief Operating Officer (COO)"></td>
<td><input type="text" id="row-29-position" name="row-29-position" value="Chief Operating Officer (COO)"></td>
<td><select size="1" id="row-29-office" name="row-29-office">
<option value="Edinburgh">
Edinburgh
@@ -857,8 +831,7 @@ $(document).ready(function() {
<tr>
<td>Shou Itou</td>
<td><input type="text" id="row-30-age" name="row-30-age" value="20"></td>
<td><input type="text" id="row-30-position" name="row-30-position" value=
"Regional Marketing"></td>
<td><input type="text" id="row-30-position" name="row-30-position" value="Regional Marketing"></td>
<td><select size="1" id="row-30-office" name="row-30-office">
<option value="Edinburgh">
Edinburgh
@@ -884,8 +857,7 @@ $(document).ready(function() {
<tr>
<td>Michelle House</td>
<td><input type="text" id="row-31-age" name="row-31-age" value="37"></td>
<td><input type="text" id="row-31-position" name="row-31-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-31-position" name="row-31-position" value="Integration Specialist"></td>
<td><select size="1" id="row-31-office" name="row-31-office">
<option value="Edinburgh">
Edinburgh
@@ -937,8 +909,7 @@ $(document).ready(function() {
<tr>
<td>Prescott Bartlett</td>
<td><input type="text" id="row-33-age" name="row-33-age" value="27"></td>
<td><input type="text" id="row-33-position" name="row-33-position" value=
"Technical Author"></td>
<td><input type="text" id="row-33-position" name="row-33-position" value="Technical Author"></td>
<td><select size="1" id="row-33-office" name="row-33-office">
<option value="Edinburgh">
Edinburgh
@@ -990,8 +961,7 @@ $(document).ready(function() {
<tr>
<td>Martena Mccray</td>
<td><input type="text" id="row-35-age" name="row-35-age" value="46"></td>
<td><input type="text" id="row-35-position" name="row-35-position" value=
"Post-Sales support"></td>
<td><input type="text" id="row-35-position" name="row-35-position" value="Post-Sales support"></td>
<td><select size="1" id="row-35-office" name="row-35-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1017,8 +987,7 @@ $(document).ready(function() {
<tr>
<td>Unity Butler</td>
<td><input type="text" id="row-36-age" name="row-36-age" value="47"></td>
<td><input type="text" id="row-36-position" name="row-36-position" value=
"Marketing Designer"></td>
<td><input type="text" id="row-36-position" name="row-36-position" value="Marketing Designer"></td>
<td><select size="1" id="row-36-office" name="row-36-office">
<option value="Edinburgh">
Edinburgh
@@ -1096,8 +1065,7 @@ $(document).ready(function() {
<tr>
<td>Vivian Harrell</td>
<td><input type="text" id="row-39-age" name="row-39-age" value="62"></td>
<td><input type="text" id="row-39-position" name="row-39-position" value=
"Financial Controller"></td>
<td><input type="text" id="row-39-position" name="row-39-position" value="Financial Controller"></td>
<td><select size="1" id="row-39-office" name="row-39-office">
<option value="Edinburgh">
Edinburgh
@@ -1175,8 +1143,7 @@ $(document).ready(function() {
<tr>
<td>Olivia Liang</td>
<td><input type="text" id="row-42-age" name="row-42-age" value="64"></td>
<td><input type="text" id="row-42-position" name="row-42-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-42-position" name="row-42-position" value="Support Engineer"></td>
<td><select size="1" id="row-42-office" name="row-42-office">
<option value="Edinburgh">
Edinburgh
@@ -1202,8 +1169,7 @@ $(document).ready(function() {
<tr>
<td>Bruno Nash</td>
<td><input type="text" id="row-43-age" name="row-43-age" value="38"></td>
<td><input type="text" id="row-43-position" name="row-43-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-43-position" name="row-43-position" value="Software Engineer"></td>
<td><select size="1" id="row-43-office" name="row-43-office">
<option value="Edinburgh">
Edinburgh
@@ -1229,8 +1195,7 @@ $(document).ready(function() {
<tr>
<td>Sakura Yamamoto</td>
<td><input type="text" id="row-44-age" name="row-44-age" value="37"></td>
<td><input type="text" id="row-44-position" name="row-44-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-44-position" name="row-44-position" value="Support Engineer"></td>
<td><select size="1" id="row-44-office" name="row-44-office">
<option value="Edinburgh">
Edinburgh
@@ -1282,8 +1247,7 @@ $(document).ready(function() {
<tr>
<td>Finn Camacho</td>
<td><input type="text" id="row-46-age" name="row-46-age" value="47"></td>
<td><input type="text" id="row-46-position" name="row-46-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-46-position" name="row-46-position" value="Support Engineer"></td>
<td><select size="1" id="row-46-office" name="row-46-office">
<option value="Edinburgh">
Edinburgh
@@ -1309,8 +1273,7 @@ $(document).ready(function() {
<tr>
<td>Serge Baldwin</td>
<td><input type="text" id="row-47-age" name="row-47-age" value="64"></td>
<td><input type="text" id="row-47-position" name="row-47-position" value=
"Data Coordinator"></td>
<td><input type="text" id="row-47-position" name="row-47-position" value="Data Coordinator"></td>
<td><select size="1" id="row-47-office" name="row-47-office">
<option value="Edinburgh">
Edinburgh
@@ -1336,8 +1299,7 @@ $(document).ready(function() {
<tr>
<td>Zenaida Frank</td>
<td><input type="text" id="row-48-age" name="row-48-age" value="63"></td>
<td><input type="text" id="row-48-position" name="row-48-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-48-position" name="row-48-position" value="Software Engineer"></td>
<td><select size="1" id="row-48-office" name="row-48-office">
<option value="Edinburgh">
Edinburgh
@@ -1363,8 +1325,7 @@ $(document).ready(function() {
<tr>
<td>Zorita Serrano</td>
<td><input type="text" id="row-49-age" name="row-49-age" value="56"></td>
<td><input type="text" id="row-49-position" name="row-49-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-49-position" name="row-49-position" value="Software Engineer"></td>
<td><select size="1" id="row-49-office" name="row-49-office">
<option value="Edinburgh">
Edinburgh
@@ -1390,8 +1351,7 @@ $(document).ready(function() {
<tr>
<td>Jennifer Acosta</td>
<td><input type="text" id="row-50-age" name="row-50-age" value="43"></td>
<td><input type="text" id="row-50-position" name="row-50-position" value=
"Junior Javascript Developer"></td>
<td><input type="text" id="row-50-position" name="row-50-position" value="Junior Javascript Developer"></td>
<td><select size="1" id="row-50-office" name="row-50-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1417,8 +1377,7 @@ $(document).ready(function() {
<tr>
<td>Cara Stevens</td>
<td><input type="text" id="row-51-age" name="row-51-age" value="46"></td>
<td><input type="text" id="row-51-position" name="row-51-position" value=
"Sales Assistant"></td>
<td><input type="text" id="row-51-position" name="row-51-position" value="Sales Assistant"></td>
<td><select size="1" id="row-51-office" name="row-51-office">
<option value="Edinburgh">
Edinburgh
@@ -1444,8 +1403,7 @@ $(document).ready(function() {
<tr>
<td>Hermione Butler</td>
<td><input type="text" id="row-52-age" name="row-52-age" value="47"></td>
<td><input type="text" id="row-52-position" name="row-52-position" value=
"Regional Director"></td>
<td><input type="text" id="row-52-position" name="row-52-position" value="Regional Director"></td>
<td><select size="1" id="row-52-office" name="row-52-office">
<option value="Edinburgh">
Edinburgh
@@ -1471,8 +1429,7 @@ $(document).ready(function() {
<tr>
<td>Lael Greer</td>
<td><input type="text" id="row-53-age" name="row-53-age" value="21"></td>
<td><input type="text" id="row-53-position" name="row-53-position" value=
"Systems Administrator"></td>
<td><input type="text" id="row-53-position" name="row-53-position" value="Systems Administrator"></td>
<td><select size="1" id="row-53-office" name="row-53-office">
<option value="Edinburgh">
Edinburgh
@@ -1524,8 +1481,7 @@ $(document).ready(function() {
<tr>
<td>Shad Decker</td>
<td><input type="text" id="row-55-age" name="row-55-age" value="51"></td>
<td><input type="text" id="row-55-position" name="row-55-position" value=
"Regional Director"></td>
<td><input type="text" id="row-55-position" name="row-55-position" value="Regional Director"></td>
<td><select size="1" id="row-55-office" name="row-55-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1551,8 +1507,7 @@ $(document).ready(function() {
<tr>
<td>Michael Bruce</td>
<td><input type="text" id="row-56-age" name="row-56-age" value="29"></td>
<td><input type="text" id="row-56-position" name="row-56-position" value=
"Javascript Developer"></td>
<td><input type="text" id="row-56-position" name="row-56-position" value="Javascript Developer"></td>
<td><select size="1" id="row-56-office" name="row-56-office">
<option value="Edinburgh">
Edinburgh
@@ -1578,8 +1533,7 @@ $(document).ready(function() {
<tr>
<td>Donna Snider</td>
<td><input type="text" id="row-57-age" name="row-57-age" value="27"></td>
<td><input type="text" id="row-57-position" name="row-57-position" value=
"Customer Support"></td>
<td><input type="text" id="row-57-position" name="row-57-position" value="Customer Support"></td>
<td><select size="1" id="row-57-office" name="row-57-office">
<option value="Edinburgh">
Edinburgh
@@ -1615,8 +1569,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable();
$('button').click( function() {
@@ -1629,8 +1582,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -1639,36 +1591,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -1691,8 +1638,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -1700,8 +1646,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -1714,19 +1659,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -1762,8 +1706,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -1804,8 +1747,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -1813,10 +1755,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -1824,14 +1764,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -53,19 +53,14 @@ $(document).ready(function() {
<h1>DataTables example <span>Highlighting rows and columns</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>This example shows that in action on DataTable by making use of the <a href=
"//datatables.net/reference/api/cell().index()"><code class="api" title=
"DataTables API method">cell().index()<span>DT</span></code></a> method to get the index of the column
that is to be operated on, and then the <a href=
"//datatables.net/reference/api/cells().nodes()"><code class="api" title=
"DataTables API method">cells().nodes()<span>DT</span></code></a> and <a href=
"//datatables.net/reference/api/column().nodes()"><code class="api" title=
"DataTables API method">column().nodes()<span>DT</span></code></a> methods to remove old classes and
apply the new highlighted class, respectively.</p>
<p>This example shows that in action on DataTable by making use of the <a href="//datatables.net/reference/api/cell().index()"><code class="api" title=
"DataTables API method">cell().index()<span>DT</span></code></a> method to get the index of the column that is to be operated on, and then the <a href=
"//datatables.net/reference/api/cells().nodes()"><code class="api" title="DataTables API method">cells().nodes()<span>DT</span></code></a> and <a href=
"//datatables.net/reference/api/column().nodes()"><code class="api" title="DataTables API method">column().nodes()<span>DT</span></code></a> methods to remove old
classes and apply the new highlighted class, respectively.</p>
</div>
<table id="example" class="row-border hover order-column" cellspacing="0" width="100%">
@@ -561,8 +556,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var lastIdx = null;
var table = $('#example').DataTable();
@@ -580,8 +574,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -590,38 +583,33 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">td.highlight {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">td.highlight {
background-color: whitesmoke !important;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -644,8 +632,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -653,8 +640,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -667,19 +653,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -715,8 +700,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li class="active"><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -757,8 +741,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -766,10 +749,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -777,14 +758,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -19,9 +19,8 @@
<h1>DataTables example <span>API</span></h1>
<div class="info">
<p>The real power of DataTables can be exploited through the use of the API that it presents. The
DataTables API is designed to be simple, consistent and easy to use. The examples in this section show
how the API may be used.</p>
<p>The real power of DataTables can be exploited through the use of the API that it presents. The DataTables API is designed to be simple, consistent and easy to
use. The examples in this section show how the API may be used.</p>
</div>
</section>
</div>
@@ -37,8 +36,7 @@
<ul class="toc">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -54,14 +52,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -36,10 +36,11 @@ $(document).ready(function() {
var table = $('#example').DataTable();
// Apply the search
table.columns().eq( 0 ).each( function ( colIdx ) {
$( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
table
.column( colIdx )
table.columns().every( function () {
var that = this;
$( 'input', this.footer() ).on( 'keyup change', function () {
that
.search( this.value )
.draw();
} );
@@ -56,28 +57,21 @@ $(document).ready(function() {
<h1>DataTables example <span>Individual column searching (text inputs)</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>DataTables has the ability to apply searching to a specific column through the <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a> method (note that the name of the
method is <code>search</code> not <code>filter</code> since <a href=
"//datatables.net/reference/api/filter()"><code class="api" title=
"DataTables API method">filter()<span>DT</span></code></a> is used to apply a filter to a result
set).</p>
<p>DataTables has the ability to apply searching to a specific column through the <a href="//datatables.net/reference/api/column().search()"><code class="api"
title="DataTables API method">column().search()<span>DT</span></code></a> method (note that the name of the method is <code>search</code> not <code>filter</code>
since <a href="//datatables.net/reference/api/filter()"><code class="api" title="DataTables API method">filter()<span>DT</span></code></a> is used to apply a
filter to a result set).</p>
<p>The column searches are cumulative, so you can apply multiple individual column searchs, in addition
to the global search, allowing complex searching options to be presented to the user.</p>
<p>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.</p>
<p>This examples shows text elements being used with the <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a> method to add input controls in the
footer of the table for each column. Note that the <code>*index*:visible</code> option is used for the
column selector to ensure that the <a href="//datatables.net/reference/api/column()"><code class="api"
title="DataTables API method">column()<span>DT</span></code></a> method takes into account any hidden
columns when selecting the column to act upon.</p>
<p>This examples shows text elements being used with the <a href="//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a> method to add input controls in the footer of the table for each column. Note that the
<code>*index*:visible</code> option is used for the column selector to ensure that the <a href="//datatables.net/reference/api/column()"><code class="api" title=
"DataTables API method">column()<span>DT</span></code></a> method takes into account any hidden columns when selecting the column to act upon.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -573,8 +567,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#example tfoot th').each( function () {
var title = $('#example thead th').eq( $(this).index() ).text();
@@ -585,18 +578,18 @@ $(document).ready(function() {
var table = $('#example').DataTable();
// Apply the search
table.columns().eq( 0 ).each( function ( colIdx ) {
$( 'input', table.column( colIdx ).footer() ).on( 'keyup change', function () {
table
.column( colIdx )
table.columns().every( function () {
var that = this;
$( 'input', this.footer() ).on( 'keyup change', function () {
that
.search( this.value )
.draw();
} );
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -605,40 +598,35 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">tfoot input {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">tfoot input {
width: 100%;
padding: 3px;
box-sizing: border-box;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -661,8 +649,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -670,8 +657,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -684,19 +670,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -731,10 +716,8 @@ $(document).ready(function() {
<h3><a href="./index.html">API</a></h3>
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li class="active"><a href="./multi_filter.html">Individual column searching (text
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li class="active"><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -775,8 +758,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -784,10 +766,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -795,14 +775,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -20,22 +20,27 @@
$(document).ready(function() {
var table = $('#example').DataTable();
$('#example').DataTable( {
initComplete: function () {
this.api().columns().every( function () {
var column = this;
var select = $('<select><option value=""></option></select>')
.appendTo( $(column.footer()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);
$("#example tfoot th").each( function ( i ) {
var select = $('<select><option value=""></option></select>')
.appendTo( $(this).empty() )
.on( 'change', function () {
var val = $(this).val();
column
.search( val ? '^'+val+'$' : '', true, false )
.draw();
} );
table.column( i )
.search( val ? '^'+$(this).val()+'$' : val, true, false )
.draw();
column.data().unique().sort().each( function ( d, j ) {
select.append( '<option value="'+d+'">'+d+'</option>' )
} );
} );
table.column( i ).data().unique().sort().each( function ( d, j ) {
select.append( '<option value="'+d+'">'+d+'</option>' )
} );
}
} );
} );
@@ -49,31 +54,31 @@ $(document).ready(function() {
<h1>DataTables example <span>Individual column searching (select inputs)</span></h1>
<div class="info">
<p>This example is almost identical to text based individual column example and provides the same
functionality, but in this case using <code class="tag" title="HTML tag">select</code> input
controls.</p>
<p>This example is almost identical to text based individual column example and provides the same functionality, but in this case using <code class="tag" title=
"HTML tag">select</code> input controls.</p>
<p>After the table is initialised, the API is used to build the <code class="tag" title=
"HTML tag">select</code> inputs through the use of the <a href=
"//datatables.net/reference/api/column().data()"><code class="api" title=
"DataTables API method">column().data()<span>DT</span></code></a> method to get the data for each
column in turn. The helper methods <a href="//datatables.net/reference/api/unique()"><code class="api"
title="DataTables API method">unique()<span>DT</span></code></a> and <a href=
"//datatables.net/reference/api/sort()"><code class="api" title=
"DataTables API method">sort()<span>DT</span></code></a> are also used to reduce the data for set input
to unique and ordered elements. Finally the <code>change</code> event from the <code class="tag" title=
"HTML tag">select</code> input is used to trigger a column search using the <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a> method.</p>
<p>After the table is initialised, the API is used to build the <code class="tag" title="HTML tag">select</code> inputs through the use of the <a href=
"//datatables.net/reference/api/column().data()"><code class="api" title="DataTables API method">column().data()<span>DT</span></code></a> method to get the data
for each column in turn. The helper methods <a href="//datatables.net/reference/api/unique()"><code class="api" title=
"DataTables API method">unique()<span>DT</span></code></a> and <a href="//datatables.net/reference/api/sort()"><code class="api" title=
"DataTables API method">sort()<span>DT</span></code></a> are also used to reduce the data for set input to unique and ordered elements. Finally the
<code>change</code> event from the <code class="tag" title="HTML tag">select</code> input is used to trigger a column search using the <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title="DataTables API method">column().search()<span>DT</span></code></a> method.</p>
<p>Note that the <a href="//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a> 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 <a href="//datatables.net/reference/api/search()"><code class="api" title=
"DataTables API method">search()<span>DT</span></code></a> and <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a>.</p>
"DataTables API method">column().search()<span>DT</span></code></a> 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
<a href="//datatables.net/reference/api/search()"><code class="api" title="DataTables API method">search()<span>DT</span></code></a>, <a href=
"//datatables.net/reference/api/column().search()"><code class="api" title="DataTables API method">column().search()<span>DT</span></code></a> and <a href=
"//datatables.net/reference/api/%24.fn.dataTable.util.escapeRegex()"><code class="api" title=
"DataTables API method">$.fn.dataTable.util.escapeRegex()<span>DT</span></code></a> which are used for searching globally, by column and escaping regular
expressions respectively.</p>
<p>Note also that this example shows the use of <a href="//datatables.net/reference/option/initComplete"><code class="option" title=
"DataTables initialisation option">initComplete<span>DT</span></code></a> 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, <a href=
"//datatables.net/reference/option/initComplete"><code class="option" title="DataTables initialisation option">initComplete<span>DT</span></code></a> is useful to
execute code after the data has been loaded.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -569,29 +574,32 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
var table = $('#example').DataTable();
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').DataTable( {
initComplete: function () {
this.api().columns().every( function () {
var column = this;
var select = $('&lt;select&gt;&lt;option value=&quot;&quot;&gt;&lt;/option&gt;&lt;/select&gt;')
.appendTo( $(column.footer()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);
$(&quot;#example tfoot th&quot;).each( function ( i ) {
var select = $('&lt;select&gt;&lt;option value=&quot;&quot;&gt;&lt;/option&gt;&lt;/select&gt;')
.appendTo( $(this).empty() )
.on( 'change', function () {
var val = $(this).val();
column
.search( val ? '^'+val+'$' : '', true, false )
.draw();
} );
table.column( i )
.search( val ? '^'+$(this).val()+'$' : val, true, false )
.draw();
column.data().unique().sort().each( function ( d, j ) {
select.append( '&lt;option value=&quot;'+d+'&quot;&gt;'+d+'&lt;/option&gt;' )
} );
} );
table.column( i ).data().unique().sort().each( function ( d, j ) {
select.append( '&lt;option value=&quot;'+d+'&quot;&gt;'+d+'&lt;/option&gt;' )
} );
}
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -600,36 +608,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -652,8 +655,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -661,8 +663,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -675,19 +676,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -723,8 +723,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li class="active"><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li class="active"><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -765,8 +764,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -774,10 +772,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -785,14 +781,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -57,21 +57,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Search API (regular expressions)</span></h1>
<div class="info">
<p>Searching a table is one of the most common user interactions with a DataTables table, and
DataTables provides a number of methods for you to control this interaction. There are APIs for the
global search (<a href="//datatables.net/reference/api/search()"><code class="api" title=
"DataTables API method">search()<span>DT</span></code></a>) and for each individual column (<a href=
"//datatables.net/reference/api/column().search()"><code class="api" title=
"DataTables API method">column().search()<span>DT</span></code></a>).</p>
<p>Searching a table is one of the most common user interactions with a DataTables table, and DataTables provides a number of methods for you to control this
interaction. There are APIs for the global search (<a href="//datatables.net/reference/api/search()"><code class="api" title=
"DataTables API method">search()<span>DT</span></code></a>) and for each individual column (<a href="//datatables.net/reference/api/column().search()"><code class=
"api" title="DataTables API method">column().search()<span>DT</span></code></a>).</p>
<p>Note also that you must call the <a href="//datatables.net/reference/api/draw()"><code class="api"
title="DataTables API method">draw()<span>DT</span></code></a> method after performing the search, in
order for the results to be displayed.</p>
<p>Note also that you must call the <a href="//datatables.net/reference/api/draw()"><code class="api" title=
"DataTables API method">draw()<span>DT</span></code></a> method after performing the search, in order for the results to be displayed.</p>
<p>Each search (global or column) can be marked as a regular expression (allowing you to create very
complex interactions) and as a smart search or not. When smart searching is enabled on a particular
search, DataTables will modify the user input string to a complex regular expression which can make
searching more intuitive.</p>
<p>Each search (global or column) can be marked as a regular expression (allowing you to create very complex interactions) and as a smart search or not. When smart
searching is enabled on a particular search, DataTables will modify the user input string to a complex regular expression which can make searching more
intuitive.</p>
<p>This example allows you to "play" with the various searching options that DataTables provides.</p>
</div>
@@ -91,50 +87,43 @@ $(document).ready(function() {
<td>Global search</td>
<td align="center"><input type="text" class="global_filter" id="global_filter"></td>
<td align="center"><input type="checkbox" class="global_filter" id="global_regex"></td>
<td align="center"><input type="checkbox" class="global_filter" id="global_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="global_filter" id="global_smart" checked="checked"></td>
</tr>
<tr id="filter_col1" data-column="0">
<td>Column - Name</td>
<td align="center"><input type="text" class="column_filter" id="col0_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col0_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col0_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col0_smart" checked="checked"></td>
</tr>
<tr id="filter_col2" data-column="1">
<td>Column - Position</td>
<td align="center"><input type="text" class="column_filter" id="col1_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col1_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col1_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col1_smart" checked="checked"></td>
</tr>
<tr id="filter_col3" data-column="2">
<td>Column - Office</td>
<td align="center"><input type="text" class="column_filter" id="col2_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col2_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col2_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col2_smart" checked="checked"></td>
</tr>
<tr id="filter_col4" data-column="3">
<td>Column - Age</td>
<td align="center"><input type="text" class="column_filter" id="col3_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col3_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col3_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col3_smart" checked="checked"></td>
</tr>
<tr id="filter_col5" data-column="4">
<td>Column - Start date</td>
<td align="center"><input type="text" class="column_filter" id="col4_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col4_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col4_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col4_smart" checked="checked"></td>
</tr>
<tr id="filter_col6" data-column="5">
<td>Column - Salary</td>
<td align="center"><input type="text" class="column_filter" id="col5_filter"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col5_regex"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col5_smart" checked=
"checked"></td>
<td align="center"><input type="checkbox" class="column_filter" id="col5_smart" checked="checked"></td>
</tr>
</tbody>
</table>
@@ -632,8 +621,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">function filterGlobal () {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">function filterGlobal () {
$('#example').DataTable().search(
$('#global_filter').val(),
$('#global_regex').prop('checked'),
@@ -661,8 +649,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -671,36 +658,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -723,8 +705,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -732,8 +713,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -746,19 +726,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -794,8 +773,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -836,8 +814,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -845,10 +822,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -856,14 +831,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -51,7 +51,7 @@ $(document).ready(function() {
"ajax": "../ajax/data/objects.txt",
"columns": [
{
"class": 'details-control',
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": ''
@@ -92,20 +92,15 @@ $(document).ready(function() {
<h1>DataTables example <span>Child rows (show extra / detailed information)</span></h1>
<div class="info">
<p>The DataTables API has a number of methods available for attaching child rows to a <em>parent</em>
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.</p>
<p>The DataTables API has a number of methods available for attaching child rows to a <em>parent</em> 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.</p>
<p>The example below makes use of the <a href="//datatables.net/reference/api/row().child"><code class=
"api" title="DataTables API method">row().child<span>DT</span></code></a> methods to firstly check if a
row is already displayed, and if so hide it (<a href=
"//datatables.net/reference/api/row().child.hide()"><code class="api" title=
"DataTables API method">row().child.hide()<span>DT</span></code></a>), otherwise show it (<a href=
"//datatables.net/reference/api/row().child.show()"><code class="api" title=
"DataTables API method">row().child.show()<span>DT</span></code></a>). The content of the child row is,
in this example, defined by the <code>formatDetails()</code> 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.</p>
<p>The example below makes use of the <a href="//datatables.net/reference/api/row().child"><code class="api" title=
"DataTables API method">row().child<span>DT</span></code></a> methods to firstly check if a row is already displayed, and if so hide it (<a href=
"//datatables.net/reference/api/row().child.hide()"><code class="api" title="DataTables API method">row().child.hide()<span>DT</span></code></a>), otherwise show
it (<a href="//datatables.net/reference/api/row().child.show()"><code class="api" title="DataTables API method">row().child.show()<span>DT</span></code></a>). The
content of the child row is, in this example, defined by the <code>formatDetails()</code> 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.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -140,8 +135,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">/* Formatting function for row details - modify as you need */
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">/* Formatting function for row details - modify as you need */
function format ( d ) {
// `d` is the original data object for the row
return '&lt;table cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; style=&quot;padding-left:50px;&quot;&gt;'+
@@ -165,7 +159,7 @@ $(document).ready(function() {
&quot;ajax&quot;: &quot;../ajax/data/objects.txt&quot;,
&quot;columns&quot;: [
{
&quot;class&quot;: 'details-control',
&quot;className&quot;: 'details-control',
&quot;orderable&quot;: false,
&quot;data&quot;: null,
&quot;defaultContent&quot;: ''
@@ -196,8 +190,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -206,15 +199,13 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">td.details-control {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">td.details-control {
background: url('../resources/details_open.png') no-repeat center center;
cursor: pointer;
}
@@ -223,25 +214,22 @@ tr.shown td.details-control {
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -264,8 +252,7 @@ tr.shown td.details-control {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -273,8 +260,7 @@ tr.shown td.details-control {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -287,19 +273,18 @@ tr.shown td.details-control {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -335,11 +320,9 @@ tr.shown td.details-control {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li class="active"><a href="./row_details.html">Child rows (show extra / detailed
information)</a></li>
<li class="active"><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
<li><a href="./select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="./form.html">Form inputs</a></li>
@@ -378,8 +361,7 @@ tr.shown td.details-control {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -387,10 +369,8 @@ tr.shown td.details-control {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -398,14 +378,11 @@ tr.shown td.details-control {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -41,16 +41,13 @@ $(document).ready(function() {
<h1>DataTables example <span>Row selection (multiple rows)</span></h1>
<div class="info">
<p>It can be quite useful at times to provide the user with the option to select rows in a DataTable.
This can be done by simply using a click event to add / remove a class on the table rows. The <a href=
"//datatables.net/reference/api/rows().data()"><code class="api" title=
"DataTables API method">rows().data()<span>DT</span></code></a> method can then be used to get the data
for the selected rows. In this case it is simply counting the number of selected rows, but much more
complex interactions can easily be developed.</p>
<p>It can be quite useful at times to provide the user with the option to select rows in a DataTable. This can be done by simply using a click event to add /
remove a class on the table rows. The <a href="//datatables.net/reference/api/rows().data()"><code class="api" title=
"DataTables API method">rows().data()<span>DT</span></code></a> method can then be used to get the data for the selected rows. In this case it is simply counting
the number of selected rows, but much more complex interactions can easily be developed.</p>
<p>If you are looking for a more complete row selection option <a href=
"http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete API for
selecting rows and acting upon those selected rows.</p>
<p>If you are looking for a more complete row selection option <a href="http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete
API for selecting rows and acting upon those selected rows.</p>
</div><button id="button">Row count</button>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -546,8 +543,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable();
$('#example tbody').on( 'click', 'tr', function () {
@@ -559,8 +555,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -569,36 +564,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -621,8 +611,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -630,8 +619,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -644,19 +632,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -692,8 +679,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li class="active"><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -734,8 +720,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -743,10 +728,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -754,14 +737,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -47,21 +47,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Row selection and deletion (single row)</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>Also shown is the <a href="//datatables.net/reference/api/row().remove()"><code class="api" title=
"DataTables API method">row().remove()<span>DT</span></code></a> method which will delete a row from a
table, and the <a href="//datatables.net/reference/api/draw()"><code class="api" title=
"DataTables API method">draw()<span>DT</span></code></a> method with <code>false</code> as its first
parameter. This will redraw the table keeping the current paging (without the <code>false</code>
parameter the paging would be reset to the first page).</p>
"DataTables API method">row().remove()<span>DT</span></code></a> method which will delete a row from a table, and the <a href=
"//datatables.net/reference/api/draw()"><code class="api" title="DataTables API method">draw()<span>DT</span></code></a> method with <code>false</code> as its
first parameter. This will redraw the table keeping the current paging (without the <code>false</code> parameter the paging would be reset to the first page).</p>
<p>If you are looking for a more complete row selection option <a href=
"http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete API for
selecting rows and acting upon those selected rows.</p>
<p>If you are looking for a more complete row selection option <a href="http://datatables.net/extras/tabletools">TableTools for DataTables</a> provides a complete
API for selecting rows and acting upon those selected rows.</p>
</div><button id="button">Delete selected row</button>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -557,8 +553,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable();
$('#example tbody').on( 'click', 'tr', function () {
@@ -576,8 +571,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -586,36 +580,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -638,8 +627,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -647,8 +635,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -661,19 +648,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -709,13 +695,11 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
<li class="active"><a href="./select_single_row.html">Row selection and deletion (single
row)</a></li>
<li class="active"><a href="./select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="./form.html">Form inputs</a></li>
<li><a href="./counter_columns.html">Index column</a></li>
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
@@ -752,8 +736,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -761,10 +744,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -772,14 +753,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -46,28 +46,23 @@ $(document).ready(function() {
<h1>DataTables example <span>Show / hide columns dynamically</span></h1>
<div class="info">
<p>This example shows how you can make use of the <a href=
"//datatables.net/reference/api/column().visible()"><code class="api" title=
"DataTables API method">column().visible()<span>DT</span></code></a> 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 that is not required for the API function to work.</p>
<p>This example shows how you can make use of the <a href="//datatables.net/reference/api/column().visible()"><code class="api" title=
"DataTables API method">column().visible()<span>DT</span></code></a> 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 that is not required for the API function to work.</p>
<p>In addition to this, groups of columns can be shown and hidden at the same time using the <a href=
"//datatables.net/reference/api/columns()"><code class="api" title=
"DataTables API method">columns()<span>DT</span></code></a> method to select multiple columns and then
using the <a href="//datatables.net/reference/api/columns().visible()"><code class="api" title=
"DataTables API method">columns().visible()<span>DT</span></code></a> method to set their state.</p>
<p>In addition to this, groups of columns can be shown and hidden at the same time using the <a href="//datatables.net/reference/api/columns()"><code class="api"
title="DataTables API method">columns()<span>DT</span></code></a> method to select multiple columns and then using the <a href=
"//datatables.net/reference/api/columns().visible()"><code class="api" title="DataTables API method">columns().visible()<span>DT</span></code></a> method to set
their state.</p>
<p>If you are looking for a more complete column visibility interaction controls <a href=
"http://datatables.net/extras/colvis">ColVis for DataTables</a> provides a complete interface for
allowing the user to show and hide columns in the table.</p>
<p>If you are looking for a more complete column visibility interaction controls <a href="http://datatables.net/extras/colvis">ColVis for DataTables</a> provides a
complete interface for allowing the user to show and hide columns in the table.</p>
</div>
<div>
Toggle column: <a class="toggle-vis" data-column="0">Name</a> - <a class="toggle-vis" data-column=
"1">Position</a> - <a class="toggle-vis" data-column="2">Office</a> - <a class="toggle-vis"
data-column="3">Age</a> - <a class="toggle-vis" data-column="4">Start date</a> - <a class="toggle-vis"
data-column="5">Salary</a>
Toggle column: <a class="toggle-vis" data-column="0">Name</a> - <a class="toggle-vis" data-column="1">Position</a> - <a class="toggle-vis" data-column=
"2">Office</a> - <a class="toggle-vis" data-column="3">Age</a> - <a class="toggle-vis" data-column="4">Start date</a> - <a class="toggle-vis" data-column=
"5">Salary</a>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -563,8 +558,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable( {
&quot;scrollY&quot;: &quot;200px&quot;,
&quot;paging&quot;: false
@@ -581,8 +575,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -591,36 +584,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -643,8 +631,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -652,8 +639,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -666,19 +652,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -714,8 +699,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -756,8 +740,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -765,10 +748,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -776,14 +757,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -6,16 +6,15 @@
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - Scrolling and jQuery UI tabs</title>
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href=
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
<style type="text/css" class="init">
</style>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="//code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript" language="javascript" src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="../resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="../resources/demo.js"></script>
@@ -47,21 +46,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Scrolling and jQuery UI tabs</span></h1>
<div class="info">
<p>This example shows how DataTables with scrolling can be used together with jQuery UI tabs (or indeed
any other method whereby the table is in a hidden, <code>display:none</code>, element when it is
initialised). The reason this requires special consideration, is that when the DataTable is initialised
in a hidden element the browser doesn't have any measurements with which to give the DataTable, and
this will result in the misalignment of columns when scrolling is enabled.</p>
<p>This example shows how DataTables with scrolling can be used together with jQuery UI tabs (or indeed any other method whereby the table is in a hidden,
<code>display:none</code>, element when it is initialised). The reason this requires special consideration, is that when the DataTable is initialised in a hidden
element the browser doesn't have any measurements with which to give the DataTable, and this will result in the misalignment of columns when scrolling is
enabled.</p>
<p>This misalignment can be corrected by the <a href=
"//datatables.net/reference/api/columns.adjust()"><code class="api" title=
"DataTables API method">columns.adjust()<span>DT</span></code></a> method when the table is made
visible (i.e. it has dimensions).</p>
<p>This misalignment can be corrected by the <a href="//datatables.net/reference/api/columns.adjust()"><code class="api" title=
"DataTables API method">columns.adjust()<span>DT</span></code></a> method when the table is made visible (i.e. it has dimensions).</p>
<p>This example shows how the jQuery UI <code>show</code> event can be used to trigger this method
call. The visible tables on the page are selected using the static <code>dt-api-static tables()</code>
method and passing the result to <a href="//datatables.net/reference/api/columns.adjust()"><code class=
"api" title="DataTables API method">columns.adjust()<span>DT</span></code></a>.</p>
<p>This example shows how the jQuery UI <code>show</code> event can be used to trigger this method call. The visible tables on the page are selected using the
static <code>dt-api-static tables()</code> method and passing the result to <a href="//datatables.net/reference/api/columns.adjust()"><code class="api" title=
"DataTables API method">columns.adjust()<span>DT</span></code></a>.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -557,8 +552,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$(&quot;#tabs&quot;).tabs( {
&quot;activate&quot;: function(event, ui) {
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
@@ -573,50 +567,43 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
<li><a href=
"//code.jquery.com/ui/1.10.3/jquery-ui.js">//code.jquery.com/ui/1.10.3/jquery-ui.js</a></li>
<li><a href="//code.jquery.com/ui/1.11.2/jquery-ui.js">//code.jquery.com/ui/1.11.2/jquery-ui.js</a></li>
<li><a href="../../media/js/jquery.dataTables.js">../../media/js/jquery.dataTables.js</a></li>
</ul>
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css</a></li>
<li><a href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css</a></li>
<li><a href=
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -639,8 +626,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -648,8 +634,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -662,19 +647,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -710,8 +694,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./add_row.html">Add rows</a></li>
<li><a href="./multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./highlight.html">Highlighting rows and columns</a></li>
<li><a href="./row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./select_row.html">Row selection (multiple rows)</a></li>
@@ -720,8 +703,7 @@ $(document).ready(function() {
<li><a href="./counter_columns.html">Index column</a></li>
<li><a href="./show_hide.html">Show / hide columns dynamically</a></li>
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
<li class="active"><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI
tabs</a></li>
<li class="active"><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
<li><a href="./regex.html">Search API (regular expressions)</a></li>
</ul>
</div>
@@ -753,8 +735,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -762,10 +743,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -773,14 +752,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,36 +33,29 @@ $(document).ready(function() {
<h1>DataTables example <span>Alternative pagination</span></h1>
<div class="info">
<p>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 customise
the options presented to the end user. This is done through DataTables' extensible pagination
mechanism, the <a href="//datatables.net/reference/option/pagingType"><code class="option" title=
"DataTables initialisation option">pagingType<span>DT</span></code></a> option.</p>
<p>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 customise the options presented to the end user. This is done through DataTables' extensible pagination mechanism, the <a href=
"//datatables.net/reference/option/pagingType"><code class="option" title="DataTables initialisation option">pagingType<span>DT</span></code></a> option.</p>
<p>There are four built-in options for which pagination controls DataTables should show:</p>
<ul class="markdown">
<li><code class="string" title="String">simple</code> - 'Previous' and 'Next' buttons only</li>
<li><code class="string" title="String">simple_numbers</code> - 'Previous' and 'Next' buttons, plus
page numbers</li>
<li><code class="string" title="String">full</code> - 'First', 'Previous', 'Next' and 'Last'
buttons</li>
<li><code class="string" title="String">full_numbers</code> - 'First', 'Previous', 'Next' and
'Last' buttons, plus page numbers</li>
<li><code class="string" title="String">simple_numbers</code> - 'Previous' and 'Next' buttons, plus page numbers</li>
<li><code class="string" title="String">full</code> - 'First', 'Previous', 'Next' and 'Last' buttons</li>
<li><code class="string" title="String">full_numbers</code> - 'First', 'Previous', 'Next' and 'Last' buttons, plus page numbers</li>
</ul>
<p>The language strings of 'First', 'Previous' etc can be optionally through the internationalisation
options of DataTables; <a href="//datatables.net/reference/option/language.paginate.first"><code class=
"option" title="DataTables initialisation option">language.paginate.first<span>DT</span></code></a>,
<a href="//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
<p>The language strings of 'First', 'Previous' etc can be optionally through the internationalisation options of DataTables; <a href=
"//datatables.net/reference/option/language.paginate.first"><code class="option" title=
"DataTables initialisation option">language.paginate.first<span>DT</span></code></a>, <a href=
"//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
"DataTables initialisation option">language.paginate.previous<span>DT</span></code></a> etc.</p>
<p>Additional options for the buttons that are shown can be added through the use of pagination type
plug-ins. Furthermore, how the buttons are actually shown can be altered through the use of plug-in
pagination renderers.</p>
<p>Additional options for the buttons that are shown can be added through the use of pagination type plug-ins. Furthermore, how the buttons are actually shown can
be altered through the use of plug-in pagination renderers.</p>
<p>The example below shows the <code class="string" title="String">full_numbers</code> type of
pagination.</p>
<p>The example below shows the <code class="string" title="String">full_numbers</code> type of pagination.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -558,15 +551,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;pagingType&quot;: &quot;full_numbers&quot;
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -575,36 +566,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -648,19 +634,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -696,14 +681,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -740,8 +722,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -749,10 +730,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -760,14 +739,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -36,27 +36,21 @@ $(document).ready(function() {
<h1>DataTables example <span>Language - Comma decimal place</span></h1>
<div class="info">
<p>A dot (<code>.</code>) is used to mark the decimal place in Javascript, however, <a href=
"http://en.wikipedia.org/wiki/Decimal_mark">many parts of the world use a comma</a> (<code>,</code>)
and other characters such as the Unicode decimal separator (<code>&#9110;</code>) or a dash
(<code>-</code>) are often used to show the decimal place in a displayed number.</p>
<p>A dot (<code>.</code>) is used to mark the decimal place in Javascript, however, <a href="http://en.wikipedia.org/wiki/Decimal_mark">many parts of the world use
a comma</a> (<code>,</code>) and other characters such as the Unicode decimal separator (<code>&#9110;</code>) or a dash (<code>-</code>) are often used to show
the decimal place in a displayed number.</p>
<p>When reading such numbers, Javascript won't automatically recognise them as numbers, however,
DataTables' type detection and sorting methods can be instructed through the <a href=
"//datatables.net/reference/option/language.decimal"><code class="option" title=
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option which character is
used as the decimal place in your numbers. This will be used to correctly adjust DataTables' type
detection and sorting algorithms to sort numbers in your table.</p>
<p>When reading such numbers, Javascript won't automatically recognise them as numbers, however, DataTables' type detection and sorting methods can be instructed
through the <a href="//datatables.net/reference/option/language.decimal"><code class="option" title=
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option which character is used as the decimal place in your numbers. This will be
used to correctly adjust DataTables' type detection and sorting algorithms to sort numbers in your table.</p>
<p>Any character can be passed in using the <a href=
"//datatables.net/reference/option/language.decimal"><code class="option" title=
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option, although the
decimal place character used in a single table must be consistent (i.e. numbers with a dot decimal
place and comma decimal place cannot both appear in the same table). Different tables on the same page
can use different decimal characters if required.</p>
<p>Any character can be passed in using the <a href="//datatables.net/reference/option/language.decimal"><code class="option" title=
"DataTables initialisation option">language.decimal<span>DT</span></code></a> option, although the decimal place character used in a single table must be
consistent (i.e. numbers with a dot decimal place and comma decimal place cannot both appear in the same table). Different tables on the same page can use
different decimal characters if required.</p>
<p>The example below shows a comma being used as the decimal place in the currency numbers shown in the
final column.</p>
<p>The example below shows a comma being used as the decimal place in the currency numbers shown in the final column.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -552,8 +546,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;language&quot;: {
&quot;decimal&quot;: &quot;,&quot;,
@@ -562,8 +555,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -572,36 +564,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -645,19 +632,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -693,14 +679,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -737,8 +720,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -746,10 +728,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -757,14 +737,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -31,16 +31,12 @@ $(document).ready(function() {
<h1>DataTables example <span>Complex headers (rowspan and colspan)</span></h1>
<div class="info">
<p>When using tables to display data, you will often wish to display column information in groups.
DataTables fully supports <code>colspan</code> and <code>rowspan</code> in the table's header,
assigning the required order listeners to the TH element suitable for that column.</p>
<p>When using tables to display data, you will often wish to display column information in groups. DataTables fully supports <code>colspan</code> and
<code>rowspan</code> in the table's header, assigning the required order listeners to the TH element suitable for that column.</p>
<p>Each column must have one TH cell which is unique to it for the listeners to be added. By default
DataTables will use the bottom unique cell for the column to attach the order listener, if more than
one cell for a column if found. The <a href=
"//datatables.net/reference/option/orderCellsTop"><code class="option" title=
"DataTables initialisation option">orderCellsTop<span>DT</span></code></a> option can be used to tell
DataTables to use the top cell if you prefer.</p>
<p>Each column must have one TH cell which is unique to it for the listeners to be added. By default DataTables will use the bottom unique cell for the column to
attach the order listener, if more than one cell for a column if found. The <a href="//datatables.net/reference/option/orderCellsTop"><code class="option" title=
"DataTables initialisation option">orderCellsTop<span>DT</span></code></a> option can be used to tell DataTables to use the top cell if you prefer.</p>
<p>The example shown below has two sets of grouped information, grouped by colspan in the header.</p>
</div>
@@ -542,13 +538,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -557,36 +551,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -609,8 +598,7 @@ $(document).ready(function() {
<li><a href="./multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="./multiple_tables.html">Multiple tables</a></li>
<li><a href="./hidden_columns.html">Hidden columns</a></li>
<li class="active"><a href="./complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li class="active"><a href="./complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="./dom.html">DOM positioning</a></li>
<li><a href="./flexible_width.html">Flexible table width</a></li>
<li><a href="./state_save.html">State saving</a></li>
@@ -631,19 +619,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -679,14 +666,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -723,8 +707,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -732,10 +715,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -743,14 +724,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,19 +33,15 @@ $(document).ready(function() {
<h1>DataTables example <span>DOM positioning</span></h1>
<div class="info">
<p>When customising 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. To address this issue DataTables takes
inspiration from the CSS 3 Advanced Layout Module and provides the <a href=
"//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter which can be
set to indicate where you which particular features to appear in the DOM. You can also specify
<code>div</code> wrapping containers (with an id and / or class) to provide complete layout
flexibility.</p>
<p>When customising 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.
To address this issue DataTables takes inspiration from the CSS 3 Advanced Layout Module and provides the <a href=
"//datatables.net/reference/option/dom"><code class="option" title="DataTables initialisation option">dom<span>DT</span></code></a> initialisation parameter which
can be set to indicate where you which particular features to appear in the DOM. You can also specify <code>div</code> wrapping containers (with an id and / or
class) to provide complete layout flexibility.</p>
<p>Each HTML control element presented by DataTables is denoted by a single character in the <a href=
"//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> option. For example the <code>l</code>
option is used for the <code>L</code>ength changing input option.</p>
<p>Each HTML control element presented by DataTables is denoted by a single character in the <a href="//datatables.net/reference/option/dom"><code class="option"
title="DataTables initialisation option">dom<span>DT</span></code></a> option. For example the <code>l</code> option is used for the <code>L</code>ength changing
input option.</p>
<p>The built-in options available are:</p>
@@ -100,16 +96,14 @@ $(document).ready(function() {
</code>
</pre>
<p>All options (with the exception of the <code>t</code> (table) option can be specified multiple
times, for if you want to show the same control multiple times (pagination at the top and bottom of the
table for example).</p>
<p>All options (with the exception of the <code>t</code> (table) option can be specified multiple times, for if you want to show the same control multiple times
(pagination at the top and bottom of the table for example).</p>
<p>Furthermore, note that additional <a href="//datatables.net/reference/option/dom"><code class=
"option" title="DataTables initialisation option">dom<span>DT</span></code></a> options can be added to
DataTables through the use of plug-ins.</p>
<p>Furthermore, note that additional <a href="//datatables.net/reference/option/dom"><code class="option" title=
"DataTables initialisation option">dom<span>DT</span></code></a> options can be added to DataTables through the use of plug-ins.</p>
<p>In the example below, the table information is moved to the top of the table, and all the
interaction elements to the bottom, each wrapper in a container <code>div</code>.</p>
<p>In the example below, the table information is moved to the top of the table, and all the interaction elements to the bottom, each wrapper in a container
<code>div</code>.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -605,15 +599,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;dom&quot;: '&lt;&quot;top&quot;i&gt;rt&lt;&quot;bottom&quot;flp&gt;&lt;&quot;clear&quot;&gt;'
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -622,36 +614,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -695,19 +682,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -743,14 +729,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -787,8 +770,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -796,10 +778,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -807,14 +787,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,9 +35,8 @@ $(document).ready(function() {
<h1>DataTables example <span>Feature enable / disable</span></h1>
<div class="info">
<p>Disabling features that you don't wish to use for a particular table is easily done by setting a
variable in the initialisation object. In the following example only the filter feature is left enabled
(which is enabled by default).</p>
<p>Disabling features that you don't wish to use for a particular table is easily done by setting a variable in the initialisation object. In the following example
only the filter feature is left enabled (which is enabled by default).</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -533,8 +532,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;paging&quot;: false,
&quot;ordering&quot;: false,
@@ -542,8 +540,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -552,36 +549,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -625,19 +617,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -673,14 +664,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -717,8 +705,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -726,10 +713,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -737,14 +722,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,14 +35,12 @@ $(document).ready(function() {
<h1>DataTables example <span>Flexible table width</span></h1>
<div class="info">
<p>Often you may want to have your table resize dynamically with the page. Typically this is done by
assigning <code>width:100%</code> in your CSS, but this presents a problem for Javascript since it can
be very hard to get that relative size rather than the absolute pixels. As such, if you apply the
<code>width</code> attribute to the HTML table tag, it will be used as the width for the table
(overruling any CSS styles).</p>
<p>Often you may want to have your table resize dynamically with the page. Typically this is done by assigning <code>width:100%</code> in your CSS, but this
presents a problem for Javascript since it can be very hard to get that relative size rather than the absolute pixels. As such, if you apply the <code>width</code>
attribute to the HTML table tag, it will be used as the width for the table (overruling any CSS styles).</p>
<p>This example shows a table with <code>width="100%"</code> and the container is also flexible width,
so as the window is resized, the table will also resize dynamically.</p>
<p>This example shows a table with <code>width="100%"</code> and the container is also flexible width, so as the window is resized, the table will also resize
dynamically.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -538,13 +536,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -553,38 +549,33 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">div.container {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">div.container {
width: 80%;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -628,19 +619,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -676,14 +666,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -720,8 +707,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -729,10 +715,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -740,14 +724,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,22 +43,18 @@ $(document).ready(function() {
<h1>DataTables example <span>Hidden columns</span></h1>
<div class="info">
<p>There are times when you might find it useful to display only a sub-set of the information that was
available in the original table. For example you might want to reduce the amount of data shown on
screen to make it clearer for the user. This is done through the <a href=
"//datatables.net/reference/option/columns.visible"><code class="option" title=
"DataTables initialisation option">columns.visible<span>DT</span></code></a> column option.</p>
<p>There are times when you might find it useful to display only a sub-set of the information that was available in the original table. For example you might want
to reduce the amount of data shown on screen to make it clearer for the user. This is done through the <a href=
"//datatables.net/reference/option/columns.visible"><code class="option" title="DataTables initialisation option">columns.visible<span>DT</span></code></a> column
option.</p>
<p>The column that is hidden is still part of the table and can be made visible through the <code>api
column().visible()</code> API method at a future time if you wish to have columns which can be shown
and hidden.</p>
<p>The column that is hidden is still part of the table and can be made visible through the <code>api column().visible()</code> API method at a future time if you
wish to have columns which can be shown and hidden.</p>
<p>Furthermore, as the hidden data is still part of the table, it can still, optionally, be filtered
upon allowing the user access to that data (for example 'tag' information for a row entry might
used).</p>
<p>Furthermore, as the hidden data is still part of the table, it can still, optionally, be filtered upon allowing the user access to that data (for example 'tag'
information for a row entry might used).</p>
<p>In the table below both the office and age version columns have been hidden, the former is
searchable, the latter is not.</p>
<p>In the table below both the office and age version columns have been hidden, the former is not searchable, the latter is.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -554,8 +550,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;columnDefs&quot;: [
{
@@ -571,8 +566,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -581,36 +575,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -654,19 +643,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -702,14 +690,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -746,8 +731,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -755,10 +739,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -766,14 +748,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -19,9 +19,8 @@
<h1>DataTables example <span>Basic initialisation</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
</div>
</section>
</div>
@@ -57,14 +56,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -39,10 +39,8 @@ $(document).ready(function() {
<h1>DataTables example <span>Language options</span></h1>
<div class="info">
<p>Changing the language information displayed by DataTables is as simple as passing in a <a href=
"//datatables.net/reference/option/language"><code class="option" title=
"DataTables initialisation option">language<span>DT</span></code></a> object to the DataTable
constructor.</p>
<p>Changing the language information displayed by DataTables is as simple as passing in a <a href="//datatables.net/reference/option/language"><code class="option"
title="DataTables initialisation option">language<span>DT</span></code></a> object to the DataTable constructor.</p>
<p>The example above shows a different set of English string being used, rather than the defaults.</p>
</div>
@@ -540,8 +538,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;language&quot;: {
&quot;lengthMenu&quot;: &quot;Display _MENU_ records per page&quot;,
@@ -553,8 +550,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -563,36 +559,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -636,19 +627,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -684,14 +674,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -728,8 +715,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -737,10 +723,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -748,14 +732,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -43,31 +43,25 @@ $(document).ready(function() {
<h1>DataTables example <span>Multi-column ordering</span></h1>
<div class="info">
<p>DataTables allows ordering by multiple columns at the same time, which can be activated in a number
of different ways:</p>
<p>DataTables allows ordering by multiple columns at the same time, which can be activated in a number of different ways:</p>
<ul class="markdown">
<li>User shift click on a column (added the clicked column as a secondary, tertiary etc ordering
column).</li>
<li>On a per-column basis (i.e. order by a specific column and then a secondary column if the data
in the first column is identical), through the <a href=
"//datatables.net/reference/option/columns.orderData"><code class="option" title=
"DataTables initialisation option">columns.orderData<span>DT</span></code></a> option.</li>
<li>Using the <a href="//datatables.net/reference/option/columns.orderData"><code class="option"
title="DataTables initialisation option">columns.orderData<span>DT</span></code></a> option to
specify a multiple column order by default (for example <code>[ [0,'asc'], [1,'asc']
]</code>).</li>
<li>Through the <a href="//datatables.net/reference/api/order()"><code class="api" title=
"DataTables API method">order()<span>DT</span></code></a> API method.</li>
<li>User shift click on a column (added the clicked column as a secondary, tertiary etc ordering column).</li>
<li>On a per-column basis (i.e. order by a specific column and then a secondary column if the data in the first column is identical), through the <a href=
"//datatables.net/reference/option/columns.orderData"><code class="option" title="DataTables initialisation option">columns.orderData<span>DT</span></code></a>
option.</li>
<li>Using the <a href="//datatables.net/reference/option/columns.orderData"><code class="option" title=
"DataTables initialisation option">columns.orderData<span>DT</span></code></a> option to specify a multiple column order by default (for example <code>[
[0,'asc'], [1,'asc'] ]</code>).</li>
<li>Through the <a href="//datatables.net/reference/api/order()"><code class="api" title="DataTables API method">order()<span>DT</span></code></a> API
method.</li>
</ul>
<p>Note that, the ability for the user to shift click to order multiple columns can be disabled through
the <a href="//datatables.net/reference/option/orderMulti"><code class="option" title=
"DataTables initialisation option">orderMulti<span>DT</span></code></a> option.</p>
<p>Note that, the ability for the user to shift click to order multiple columns can be disabled through the <a href=
"//datatables.net/reference/option/orderMulti"><code class="option" title="DataTables initialisation option">orderMulti<span>DT</span></code></a> option.</p>
<p>The example below shows the first column having a secondary order applied to the second column in
the table, vice-versa for the second column being tied directly to the first and the salary column to
the first name column.</p>
<p>The example below shows the first column having a secondary order applied to the second column in the table, vice-versa for the second column being tied
directly to the first and the salary column to the first name column.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -494,8 +488,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
columnDefs: [ {
targets: [ 0 ],
@@ -510,8 +503,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -520,36 +512,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -593,19 +580,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -641,14 +627,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -685,8 +668,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -694,10 +676,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -705,14 +685,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,18 +35,15 @@ $(document).ready(function() {
<h1>DataTables example <span>Multiple tables</span></h1>
<div class="info">
<p>Often you might wish to initialise multiple tables with a single statement. This is trivially done
by using a jQuery selector which will pick up multiple tables.</p>
<p>Often you might wish to initialise multiple tables with a single statement. This is trivially done by using a jQuery selector which will pick up multiple
tables.</p>
<p>The tables are independent for user control (i.e. user controlled paging on one table does not
effect the others), but they do share the initialisation parameters given (for example if you specific
the Spanish language file, all tables will be shown in Spanish). Additionally, the API can be used to
manipulate both together, or independently.</p>
<p>The tables are independent for user control (i.e. user controlled paging on one table does not effect the others), but they do share the initialisation
parameters given (for example if you specific the Spanish language file, all tables will be shown in Spanish). Additionally, the API can be used to manipulate both
together, or independently.</p>
<p>The example below shows two tables initialised with a single line of code, through the use of the
<code>table.display</code> selector (i.e. select all elements which have the class of
<code>table.display</code> (which is suitable in this example, you might wish to use a different
selector).</p>
<p>The example below shows two tables initialised with a single line of code, through the use of the <code>table.display</code> selector (i.e. select all elements
which have the class of <code>table.display</code> (which is suitable in this example, you might wish to use a different selector).</p>
</div>
<table id="" class="display" cellspacing="0" width="100%">
@@ -256,13 +253,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('table.display').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -271,38 +266,33 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">div.dataTables_wrapper {
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">div.dataTables_wrapper {
margin-bottom: 3em;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -346,19 +336,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -394,14 +383,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -438,8 +424,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -447,10 +432,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -458,14 +441,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -39,17 +39,13 @@ $(document).ready(function() {
<h1>DataTables example <span>Scroll - horizontal</span></h1>
<div class="info">
<p>DataTables has the ability to show tables with horizontal scrolling, which is very useful for when
you have a wide table, but want to constrain it to a limited horizontal display area. To enable
x-scrolling simply set the <a href="//datatables.net/reference/option/scrollX"><code class="option"
title="DataTables initialisation option">scrollX<span>DT</span></code></a> parameter to be whatever you
want the container wrapper's width to be (this should be 100% in almost all cases with the width being
constrained by the container element).</p>
<p>DataTables has the ability to show tables with horizontal scrolling, which is very useful for when you have a wide table, but want to constrain it to a limited
horizontal display area. To enable x-scrolling simply set the <a href="//datatables.net/reference/option/scrollX"><code class="option" title=
"DataTables initialisation option">scrollX<span>DT</span></code></a> parameter to be whatever you want the container wrapper's width to be (this should be 100% in
almost all cases with the width being constrained by the container element).</p>
<p>The example below shows a table too wide for the containing element with x-scrolling enabled. The
CSS option of <code>th, td { white-space: nowrap; }</code> is also set to have the text content of each
row on a single line (otherwise the browser will line break the text to have it fit into the available
area).</p>
<p>The example below shows a table too wide for the containing element with x-scrolling enabled. The CSS option of <code>th, td { white-space: nowrap; }</code> is
also set to have the text content of each row on a single line (otherwise the browser will line break the text to have it fit into the available area).</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -708,15 +704,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;scrollX&quot;: true
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -725,40 +719,35 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">th, td { white-space: nowrap; }
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">th, td { white-space: nowrap; }
div.dataTables_wrapper {
width: 800px;
margin: 0 auto;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -802,19 +791,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -850,14 +838,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -894,8 +879,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -903,10 +887,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -914,14 +896,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -40,8 +40,8 @@ $(document).ready(function() {
<h1>DataTables example <span>Scroll - horizontal and vertical</span></h1>
<div class="info">
<p>In this example you can see DataTables doing both horizontal and vertical scrolling at the same
time. Note also that pagination is enabled in this example, and the scrolling accounts for this.</p>
<p>In this example you can see DataTables doing both horizontal and vertical scrolling at the same time. Note also that pagination is enabled in this example, and
the scrolling accounts for this.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -700,16 +700,14 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;scrollY&quot;: 200,
&quot;scrollX&quot;: true
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -718,40 +716,35 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;">th, td { white-space: nowrap; }
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">th, td { white-space: nowrap; }
div.dataTables_wrapper {
width: 800px;
margin: 0 auto;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -795,19 +788,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -843,14 +835,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -887,8 +876,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -896,10 +884,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -907,14 +893,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,22 +35,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Scroll - vertical</span></h1>
<div class="info">
<p>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, and as such pagination has been disabled here (note that this is not mandatory, it will work just
fine with pagination enabled as well!).</p>
<p>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, and as such pagination has been disabled here (note that this is not mandatory, it will work just fine
with pagination enabled as well!).</p>
<p>To enable y-scrolling simply set the <a href=
"//datatables.net/reference/option/scrollY"><code class="option" title=
"DataTables initialisation option">scrollY<span>DT</span></code></a> parameter to be whatever you want
the container wrapper's height to be (any CSS measurement is acceptable, or just a number which is
treated as pixels).</p>
<p>To enable y-scrolling simply set the <a href="//datatables.net/reference/option/scrollY"><code class="option" title=
"DataTables initialisation option">scrollY<span>DT</span></code></a> parameter to be whatever you want the container wrapper's height to be (any CSS measurement is
acceptable, or just a number which is treated as pixels).</p>
<p>Note also that the <a href="//datatables.net/reference/option/scrollCollapse"><code class="option"
title="DataTables initialisation option">scrollCollapse<span>DT</span></code></a> option is enabled in
this example. This will have the container match the height of the rows shown in the table if that
height is smaller than that given height by the <a href=
"//datatables.net/reference/option/scrollY"><code class="option" title=
<p>Note also that the <a href="//datatables.net/reference/option/scrollCollapse"><code class="option" title=
"DataTables initialisation option">scrollCollapse<span>DT</span></code></a> option is enabled in this example. This will have the container match the height of the
rows shown in the table if that height is smaller than that given height by the <a href="//datatables.net/reference/option/scrollY"><code class="option" title=
"DataTables initialisation option">scrollY<span>DT</span></code></a>.</p>
</div>
@@ -547,8 +542,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;scrollY&quot;: &quot;200px&quot;,
&quot;scrollCollapse&quot;: true,
@@ -556,8 +550,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -566,36 +559,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -639,19 +627,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -687,14 +674,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -731,8 +715,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -740,10 +723,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -751,14 +732,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -6,9 +6,8 @@
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>DataTables example - Scroll - vertical with jQuery UI ThemeRoller</title>
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href=
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
<style type="text/css" class="init">
@@ -37,8 +36,7 @@ $(document).ready(function() {
<h1>DataTables example <span>Scroll - vertical with jQuery UI ThemeRoller</span></h1>
<div class="info">
<p>This example is an extension of the vertical scrolling example, showing DataTables ability to be
themed by jQuery UI's ThemeRoller.</p>
<p>This example is an extension of the vertical scrolling example, showing DataTables ability to be themed by jQuery UI's ThemeRoller.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -534,8 +532,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;scrollY&quot;: 200,
&quot;scrollCollapse&quot;: true,
@@ -543,8 +540,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -553,38 +549,33 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css</a></li>
<li><a href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css</a></li>
<li><a href=
"../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css">../../extensions/Plugins/integration/jqueryui/dataTables.jqueryui.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -615,8 +606,7 @@ $(document).ready(function() {
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
<li><a href="./scroll_x.html">Scroll - horizontal</a></li>
<li><a href="./scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li class="active"><a href="./scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li class="active"><a href="./scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="./comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="./language.html">Language options</a></li>
</ul>
@@ -629,19 +619,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -677,14 +666,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -721,8 +707,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -730,10 +715,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -741,14 +724,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,29 +33,23 @@ $(document).ready(function() {
<h1>DataTables example <span>State saving</span></h1>
<div class="info">
<p>DataTables has the option of being able to save the state of a table (its paging position, ordering
state etc) so that is can be restored when the user reloads a page, or comes back to the page after
visiting a sub-page. This state saving ability is enabled by the <a href=
"//datatables.net/reference/option/stateSave"><code class="option" title=
"DataTables initialisation option">stateSave<span>DT</span></code></a> option.</p>
<p>DataTables has the option of being able to save the state of a table (its paging position, ordering state etc) so that is can be restored when the user reloads
a page, or comes back to the page after visiting a sub-page. This state saving ability is enabled by the <a href=
"//datatables.net/reference/option/stateSave"><code class="option" title="DataTables initialisation option">stateSave<span>DT</span></code></a> option.</p>
<p>The built in state saving method uses the HTML5 <code>localStorage</code> and
<code>sessionStorage</code> APIs for efficient storage of the data. Please note that this means that
the built in state saving option <strong>will not work with IE6/7</strong> as these browsers do not
support these APIs. Alternative options of using cookies or saving the state on the server through Ajax
can be used through the <a href="//datatables.net/reference/option/stateSaveCallback"><code class=
"option" title="DataTables initialisation option">stateSaveCallback<span>DT</span></code></a> and
<a href="//datatables.net/reference/option/stateLoadCallback"><code class="option" title=
"DataTables initialisation option">stateLoadCallback<span>DT</span></code></a> options.</p>
<p>The built in state saving method uses the HTML5 <code>localStorage</code> and <code>sessionStorage</code> APIs for efficient storage of the data. Please note
that this means that the built in state saving option <strong>will not work with IE6/7</strong> as these browsers do not support these APIs. Alternative options of
using cookies or saving the state on the server through Ajax can be used through the <a href="//datatables.net/reference/option/stateSaveCallback"><code class=
"option" title="DataTables initialisation option">stateSaveCallback<span>DT</span></code></a> and <a href=
"//datatables.net/reference/option/stateLoadCallback"><code class="option" title="DataTables initialisation option">stateLoadCallback<span>DT</span></code></a>
options.</p>
<p>The duration for which the saved state is valid and can be used to restore the table state can be
set using the <a href="//datatables.net/reference/option/stateDuration"><code class="option" title=
"DataTables initialisation option">stateDuration<span>DT</span></code></a> initialisation parameter (2
hours by default). This parameter also controls if <code>localStorage</code> (0 or greater) or
<code>sessionStorage</code> (-1) is used to store the data.</p>
<p>The duration for which the saved state is valid and can be used to restore the table state can be set using the <a href=
"//datatables.net/reference/option/stateDuration"><code class="option" title="DataTables initialisation option">stateDuration<span>DT</span></code></a>
initialisation parameter (2 hours by default). This parameter also controls if <code>localStorage</code> (0 or greater) or <code>sessionStorage</code> (-1) is used
to store the data.</p>
<p>The example below simply shows state saving enabled in DataTables with the <a href=
"//datatables.net/reference/option/stateSave"><code class="option" title=
<p>The example below simply shows state saving enabled in DataTables with the <a href="//datatables.net/reference/option/stateSave"><code class="option" title=
"DataTables initialisation option">stateSave<span>DT</span></code></a> option.</p>
</div>
@@ -552,15 +546,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
stateSave: true
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -569,36 +561,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -642,19 +629,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -690,14 +676,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -734,8 +717,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -743,10 +725,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -754,14 +734,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,19 +33,15 @@ $(document).ready(function() {
<h1>DataTables example <span>Default ordering (sorting)</span></h1>
<div class="info">
<p>With DataTables you can alter the ordering characteristics of the table at initialisation time.
Using the <a href="//datatables.net/reference/option/order"><code class="option" title=
"DataTables initialisation option">order<span>DT</span></code></a> initialisation parameter, you can
set the table to display the data in exactly the order that you want.</p>
<p>With DataTables you can alter the ordering characteristics of the table at initialisation time. Using the <a href=
"//datatables.net/reference/option/order"><code class="option" title="DataTables initialisation option">order<span>DT</span></code></a> initialisation parameter,
you can set the table to display the data in exactly the order that you want.</p>
<p>The <a href="//datatables.net/reference/option/order"><code class="option" title=
"DataTables initialisation option">order<span>DT</span></code></a> parameter is an array of arrays
where the first value of the inner array is the column to order on, and the second is <code class=
"string" title="String">'asc'</code> (ascending ordering) or <code class="string" title=
"String">'desc'</code> (descending ordering) as required. <a href=
"//datatables.net/reference/option/order"><code class="option" title=
"DataTables initialisation option">order<span>DT</span></code></a> is a 2D array to allow multi-column
ordering to be defined.</p>
<p>The <a href="//datatables.net/reference/option/order"><code class="option" title="DataTables initialisation option">order<span>DT</span></code></a> parameter is
an array of arrays where the first value of the inner array is the column to order on, and the second is <code class="string" title="String">'asc'</code>
(ascending ordering) or <code class="string" title="String">'desc'</code> (descending ordering) as required. <a href=
"//datatables.net/reference/option/order"><code class="option" title="DataTables initialisation option">order<span>DT</span></code></a> is a 2D array to allow
multi-column ordering to be defined.</p>
<p>The table below is ordered (descending) by the Age column.</p>
</div>
@@ -543,15 +539,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;order&quot;: [[ 3, &quot;desc&quot; ]]
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -560,36 +554,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -633,19 +622,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -681,14 +669,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -725,8 +710,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -734,10 +718,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -745,14 +727,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -20,7 +20,7 @@
$(document).ready(function() {
$('#example').dataTable();
$('#example').DataTable();
} );
@@ -33,11 +33,9 @@ $(document).ready(function() {
<h1>DataTables example <span>Zero configuration</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>Searching, ordering, paging etc goodness will be immediately added to the table, as shown in this
example.</p>
<p>Searching, ordering, paging etc goodness will be immediately added to the table, as shown in this example.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -533,13 +531,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
$('#example').dataTable();
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').DataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -548,36 +544,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -621,19 +612,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -669,14 +659,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -713,8 +700,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -722,10 +708,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -733,14 +717,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,23 +35,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Ajax sourced data</span></h1>
<div class="info">
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by
Ajax. This can be done, in its most simple form, by setting the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> option to the address of the JSON
data source.</p>
<p>DataTables has the ability to read data from virtually any JSON data source that can be obtained by Ajax. This can be done, in its most simple form, by setting
the <a href="//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option to the
address of the JSON data source.</p>
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> option also allows for more advanced
configuration such as altering how the Ajax request is made. See the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title=
"DataTables initialisation option">ajax<span>DT</span></code></a> documentation and the <a href=
"../ajax">other Ajax examples</a> for further information.</p>
<p>The <a href="//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option also
allows for more advanced configuration such as altering how the Ajax request is made. See the <a href="//datatables.net/reference/option/ajax"><code class="option"
title="DataTables initialisation option">ajax<span>DT</span></code></a> documentation and the <a href="../ajax">other Ajax examples</a> for further
information.</p>
<p>The example below shows DataTables loading data for a table from arrays as the data source (object
parameters can also be used through the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option ).</p>
<p>The example below shows DataTables loading data for a table from arrays as the data source (object parameters can also be used through the <a href=
"//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a> option ).</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -88,15 +82,13 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;ajax&quot;: '../ajax/data/arrays.txt'
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -105,36 +97,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -157,8 +144,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -166,8 +152,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -180,19 +165,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -228,14 +212,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -272,8 +253,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -281,10 +261,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -292,14 +270,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -33,13 +33,11 @@ $(document).ready(function() {
<h1>DataTables example <span>HTML (DOM) sourced data</span></h1>
<div class="info">
<p>The foundation for DataTables is progressive enhancement, so it is very adept at reading table
information directly from the DOM. This example shows how easy it is to add searching, ordering and
paging to your HTML table by simply running DataTables on it.</p>
<p>The foundation for DataTables is progressive enhancement, so it is very adept at reading table information directly from the DOM. This example shows how easy it
is to add searching, ordering and paging to your HTML table by simply running DataTables on it.</p>
<p>For further and more complex examples of using DataTables with DOM sourced data, please refer to the
<a href="../basic_init">basic initialisation</a> and <a href="../advanced_init">advanced</a>
examples.</p>
<p>For further and more complex examples of using DataTables with DOM sourced data, please refer to the <a href="../basic_init">basic initialisation</a> and
<a href="../advanced_init">advanced</a> examples.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -535,13 +533,11 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -550,36 +546,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -602,8 +593,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -611,8 +601,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -625,19 +614,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -673,14 +661,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -717,8 +702,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -726,10 +710,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -737,14 +719,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -28,8 +28,8 @@
<li>Ajax sourced data with server-side processing</li>
</ul>
<p>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.</p>
<p>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.</p>
</div>
</section>
</div>
@@ -52,14 +52,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -104,17 +104,14 @@ $(document).ready(function() {
<h1>DataTables example <span>Javascript sourced data</span></h1>
<div class="info">
<p>At times you will wish to be able to create a table from dynamic information passed directly to
DataTables, rather than having it read from the document. This is achieved using the <a href=
"//datatables.net/reference/option/data"><code class="option" title=
"DataTables initialisation option">data<span>DT</span></code></a> option in the initialisation object,
passing in an array of data to be used (like all other DataTables handled data, this can be arrays or
objects using the <a href="//datatables.net/reference/option/columns.data"><code class="option" title=
"DataTables initialisation option">columns.data<span>DT</span></code></a> option).</p>
<p>At times you will wish to be able to create a table from dynamic information passed directly to DataTables, rather than having it read from the document. This
is achieved using the <a href="//datatables.net/reference/option/data"><code class="option" title="DataTables initialisation option">data<span>DT</span></code></a>
option in the initialisation object, passing in an array of data to be used (like all other DataTables handled data, this can be arrays or objects using the
<a href="//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data<span>DT</span></code></a>
option).</p>
<p>A <code>&lt;table&gt;</code> must be available on the page for DataTables to use. This examples
shows the element being added by Javascript and then initialising the DataTable with a set of data from
a Javascript array.</p>
<p>A <code>&lt;table&gt;</code> must be available on the page for DataTables to use. This examples shows the element being added by Javascript and then
initialising the DataTable with a set of data from a Javascript array.</p>
</div>
<div id="demo"></div>
@@ -129,8 +126,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">var dataSet = [
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">var dataSet = [
['Trident','Internet Explorer 4.0','Win 95+','4','X'],
['Trident','Internet Explorer 5.0','Win 95+','5','C'],
['Trident','Internet Explorer 5.5','Win 95+','5.5','A'],
@@ -205,8 +201,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -215,36 +210,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -267,8 +257,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -276,8 +265,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -290,19 +278,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -338,14 +325,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -382,8 +366,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -391,10 +374,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -402,14 +383,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -35,22 +35,17 @@ $(document).ready(function() {
<h1>DataTables example <span>Server-side processing</span></h1>
<div class="info">
<p>There are many ways to get your data into DataTables, and if you are working with seriously large
databases, you might want to consider using the server-side options that DataTables provides. With
server-side processing enabled, all paging, searching, ordering actions that DataTables performs are
handed off to a server where an SQL engine (or similar) can perform these actions on the large data set
(after all, that's what the database engine is designed for!). As such, each draw of the table will
result in a new Ajax request being made to get the required data.</p>
<p>There are many ways to get your data into DataTables, and if you are working with seriously large databases, you might want to consider using the server-side
options that DataTables provides. With server-side processing enabled, all paging, searching, ordering actions that DataTables performs are handed off to a server
where an SQL engine (or similar) can perform these actions on the large data set (after all, that's what the database engine is designed for!). As such, each draw
of the table will result in a new Ajax request being made to get the required data.</p>
<p>Server-side processing is enabled by setting the <a href=
"//datatables.net/reference/option/serverSide"><code class="option" title=
"DataTables initialisation option">serverSide<span>DT</span></code></a> option to <code>true</code> and
providing an Ajax data source through the <a href="//datatables.net/reference/option/ajax"><code class=
"option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option.</p>
<p>Server-side processing is enabled by setting the <a href="//datatables.net/reference/option/serverSide"><code class="option" title=
"DataTables initialisation option">serverSide<span>DT</span></code></a> option to <code>true</code> and providing an Ajax data source through the <a href=
"//datatables.net/reference/option/ajax"><code class="option" title="DataTables initialisation option">ajax<span>DT</span></code></a> option.</p>
<p>This example shows a very simple table, matching the other examples, but in this instance using
server-side processing. For further and more complex examples of using server-side processing, please
refer to the <a href="../server_side">server-side processing</a> examples.</p>
<p>This example shows a very simple table, matching the other examples, but in this instance using server-side processing. For further and more complex examples of
using server-side processing, please refer to the <a href="../server_side">server-side processing</a> examples.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -87,8 +82,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$(document).ready(function() {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
$('#example').dataTable( {
&quot;processing&quot;: true,
&quot;serverSide&quot;: true,
@@ -96,8 +90,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -106,36 +99,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -158,8 +146,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -167,8 +154,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -181,19 +167,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -229,14 +214,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -273,8 +255,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -282,10 +263,8 @@ $(document).ready(function() {
<h3><a href="../plug-ins/index.html">Plug-ins</a></h3>
<ul class="toc">
<li><a href="../plug-ins/api.html">API plug-in methods</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li><a href="../plug-ins/sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="../plug-ins/sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="../plug-ins/range_filtering.html">Custom filtering - range search</a></li>
<li><a href="../plug-ins/dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -293,14 +272,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -19,10 +19,9 @@
<h1>DataTables example <span>Examples index</span></h1>
<div class="info">
<p>One of the best ways to learn how to do anything new (including software APIs!) is to get your hands
dirty as quickly as possible. These examples will show you how to perform tasks ranging from something
as simple as applying DataTables to an HTML table, right the way through to doing server-side
processing with pipelining and custom plug-in functions.</p>
<p>One of the best ways to learn how to do anything new (including software APIs!) is to get your hands dirty as quickly as possible. These examples will show you
how to perform tasks ranging from something as simple as applying DataTables to an HTML table, right the way through to doing server-side processing with
pipelining and custom plug-in functions.</p>
</div>
</section>
</div>
@@ -42,8 +41,7 @@
<li><a href="./basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="./basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="./basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="./basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="./basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="./basic_init/dom.html">DOM positioning</a></li>
<li><a href="./basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="./basic_init/state_save.html">State saving</a></li>
@@ -51,8 +49,7 @@
<li><a href="./basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="./basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="./basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="./basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="./basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="./basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="./basic_init/language.html">Language options</a></li>
</ul>
@@ -65,19 +62,18 @@
<li><a href="./advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="./advanced_init/column_render.html">Column rendering</a></li>
<li><a href="./advanced_init/length_menu.html">Page length options</a></li>
<li><a href="./advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="./advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="./advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="./advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="./advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="./advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="./advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="./advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="./advanced_init/language_file.html">Language file</a></li>
<li><a href="./advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="./advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="./advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="./advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="./advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="./advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="./advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -113,11 +109,9 @@
<ul class="toc">
<li><a href="./api/add_row.html">Add rows</a></li>
<li><a href="./api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="./api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="./api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="./api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="./api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="./api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="./api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="./api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="./api/form.html">Form inputs</a></li>
@@ -156,8 +150,7 @@
<li><a href="./server_side/select_rows.html">Row selection</a></li>
<li><a href="./server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="./server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="./server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="./server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -174,14 +167,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -54,21 +54,16 @@ $(document).ready(function() {
<h1>DataTables example <span>API plug-in methods</span></h1>
<div class="info">
<p>The DataTables API is designed to be fully extensible, with custom functions being very easy to add
using the <code>$.fn.dataTable.Api.register</code> function. This function takes two arguments; the
first being the name of the method to be added and its chaining hierarchy, and the second the function
itself.</p>
<p>The DataTables API is designed to be fully extensible, with custom functions being very easy to add using the <code>$.fn.dataTable.Api.register</code> function.
This function takes two arguments; the first being the name of the method to be added and its chaining hierarchy, and the second the function itself.</p>
<p>This example shows how a <code>sum()</code> method can easily be added to the Api so you can get the
sum of a column in a single line: <code>table.column().data().sum()</code>. Due to the chaining of the
methods, this allows <code>sum()</code> to very easily give the sum for any selected column, and to
limit the sum to just the current page, filtered data or all pages. This is done using the options for
the <a href="//datatables.net/reference/api/column()"><code class="api" title=
"DataTables API method">column()<span>DT</span></code></a> method and the options for its
<p>This example shows how a <code>sum()</code> method can easily be added to the Api so you can get the sum of a column in a single line:
<code>table.column().data().sum()</code>. Due to the chaining of the methods, this allows <code>sum()</code> to very easily give the sum for any selected column,
and to limit the sum to just the current page, filtered data or all pages. This is done using the options for the <a href=
"//datatables.net/reference/api/column()"><code class="api" title="DataTables API method">column()<span>DT</span></code></a> method and the options for its
selectors.</p>
<p>For more information about API plug-ins; creating them and their requirements, please refer to the
plug-in development documentation.</p>
<p>For more information about API plug-ins; creating them and their requirements, please refer to the plug-in development documentation.</p>
</div>
<div id="demo">
@@ -565,8 +560,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$.fn.dataTable.Api.register( 'column().data().sum()', function () {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$.fn.dataTable.Api.register( 'column().data().sum()', function () {
return this.reduce( function (a, b) {
var x = parseFloat( a ) || 0;
var y = parseFloat( b ) || 0;
@@ -591,8 +585,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -601,36 +594,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -653,8 +641,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -662,8 +649,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -676,19 +662,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -724,14 +709,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -768,8 +750,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -786,14 +767,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -57,7 +57,7 @@ $(document).ready(function() {
"columns": [
null,
{ "orderDataType": "dom-text-numeric" },
{ "orderDataType": "dom-text" },
{ "orderDataType": "dom-text", type: 'string' },
{ "orderDataType": "dom-select" }
]
} );
@@ -73,24 +73,18 @@ $(document).ready(function() {
<h1>DataTables example <span>Live DOM ordering</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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 <a href=
"//datatables.net/reference/api/order()"><code class="api" title=
"DataTables API method">order()<span>DT</span></code></a> or <a href=
"//datatables.net/reference/api/draw()"><code class="api" title=
"DataTables API method">draw()<span>DT</span></code></a> methods.</p>
<p>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 <a href=
"//datatables.net/reference/api/order()"><code class="api" title="DataTables API method">order()<span>DT</span></code></a> or <a href=
"//datatables.net/reference/api/draw()"><code class="api" title="DataTables API method">draw()<span>DT</span></code></a> methods.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -168,8 +162,7 @@ $(document).ready(function() {
<tr>
<td>Ashton Cox</td>
<td><input type="text" id="row-3-age" name="row-3-age" value="66"></td>
<td><input type="text" id="row-3-position" name="row-3-position" value=
"Junior Technical Author"></td>
<td><input type="text" id="row-3-position" name="row-3-position" value="Junior Technical Author"></td>
<td><select size="1" id="row-3-office" name="row-3-office">
<option value="Edinburgh">
Edinburgh
@@ -195,8 +188,7 @@ $(document).ready(function() {
<tr>
<td>Cedric Kelly</td>
<td><input type="text" id="row-4-age" name="row-4-age" value="22"></td>
<td><input type="text" id="row-4-position" name="row-4-position" value=
"Senior Javascript Developer"></td>
<td><input type="text" id="row-4-position" name="row-4-position" value="Senior Javascript Developer"></td>
<td><select size="1" id="row-4-office" name="row-4-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -248,8 +240,7 @@ $(document).ready(function() {
<tr>
<td>Brielle Williamson</td>
<td><input type="text" id="row-6-age" name="row-6-age" value="61"></td>
<td><input type="text" id="row-6-position" name="row-6-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-6-position" name="row-6-position" value="Integration Specialist"></td>
<td><select size="1" id="row-6-office" name="row-6-office">
<option value="Edinburgh">
Edinburgh
@@ -301,8 +292,7 @@ $(document).ready(function() {
<tr>
<td>Rhona Davidson</td>
<td><input type="text" id="row-8-age" name="row-8-age" value="55"></td>
<td><input type="text" id="row-8-position" name="row-8-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-8-position" name="row-8-position" value="Integration Specialist"></td>
<td><select size="1" id="row-8-office" name="row-8-office">
<option value="Edinburgh">
Edinburgh
@@ -328,8 +318,7 @@ $(document).ready(function() {
<tr>
<td>Colleen Hurst</td>
<td><input type="text" id="row-9-age" name="row-9-age" value="39"></td>
<td><input type="text" id="row-9-position" name="row-9-position" value=
"Javascript Developer"></td>
<td><input type="text" id="row-9-position" name="row-9-position" value="Javascript Developer"></td>
<td><select size="1" id="row-9-office" name="row-9-office">
<option value="Edinburgh">
Edinburgh
@@ -355,8 +344,7 @@ $(document).ready(function() {
<tr>
<td>Sonya Frost</td>
<td><input type="text" id="row-10-age" name="row-10-age" value="23"></td>
<td><input type="text" id="row-10-position" name="row-10-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-10-position" name="row-10-position" value="Software Engineer"></td>
<td><select size="1" id="row-10-office" name="row-10-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -434,8 +422,7 @@ $(document).ready(function() {
<tr>
<td>Charde Marshall</td>
<td><input type="text" id="row-13-age" name="row-13-age" value="36"></td>
<td><input type="text" id="row-13-position" name="row-13-position" value=
"Regional Director"></td>
<td><input type="text" id="row-13-position" name="row-13-position" value="Regional Director"></td>
<td><select size="1" id="row-13-office" name="row-13-office">
<option value="Edinburgh">
Edinburgh
@@ -461,8 +448,7 @@ $(document).ready(function() {
<tr>
<td>Haley Kennedy</td>
<td><input type="text" id="row-14-age" name="row-14-age" value="43"></td>
<td><input type="text" id="row-14-position" name="row-14-position" value=
"Senior Marketing Designer"></td>
<td><input type="text" id="row-14-position" name="row-14-position" value="Senior Marketing Designer"></td>
<td><select size="1" id="row-14-office" name="row-14-office">
<option value="Edinburgh">
Edinburgh
@@ -488,8 +474,7 @@ $(document).ready(function() {
<tr>
<td>Tatyana Fitzpatrick</td>
<td><input type="text" id="row-15-age" name="row-15-age" value="19"></td>
<td><input type="text" id="row-15-position" name="row-15-position" value=
"Regional Director"></td>
<td><input type="text" id="row-15-position" name="row-15-position" value="Regional Director"></td>
<td><select size="1" id="row-15-office" name="row-15-office">
<option value="Edinburgh">
Edinburgh
@@ -515,8 +500,7 @@ $(document).ready(function() {
<tr>
<td>Michael Silva</td>
<td><input type="text" id="row-16-age" name="row-16-age" value="66"></td>
<td><input type="text" id="row-16-position" name="row-16-position" value=
"Marketing Designer"></td>
<td><input type="text" id="row-16-position" name="row-16-position" value="Marketing Designer"></td>
<td><select size="1" id="row-16-office" name="row-16-office">
<option value="Edinburgh">
Edinburgh
@@ -542,8 +526,7 @@ $(document).ready(function() {
<tr>
<td>Paul Byrd</td>
<td><input type="text" id="row-17-age" name="row-17-age" value="64"></td>
<td><input type="text" id="row-17-position" name="row-17-position" value=
"Chief Financial Officer (CFO)"></td>
<td><input type="text" id="row-17-position" name="row-17-position" value="Chief Financial Officer (CFO)"></td>
<td><select size="1" id="row-17-office" name="row-17-office">
<option value="Edinburgh">
Edinburgh
@@ -569,8 +552,7 @@ $(document).ready(function() {
<tr>
<td>Gloria Little</td>
<td><input type="text" id="row-18-age" name="row-18-age" value="59"></td>
<td><input type="text" id="row-18-position" name="row-18-position" value=
"Systems Administrator"></td>
<td><input type="text" id="row-18-position" name="row-18-position" value="Systems Administrator"></td>
<td><select size="1" id="row-18-office" name="row-18-office">
<option value="Edinburgh">
Edinburgh
@@ -596,8 +578,7 @@ $(document).ready(function() {
<tr>
<td>Bradley Greer</td>
<td><input type="text" id="row-19-age" name="row-19-age" value="41"></td>
<td><input type="text" id="row-19-position" name="row-19-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-19-position" name="row-19-position" value="Software Engineer"></td>
<td><select size="1" id="row-19-office" name="row-19-office">
<option value="Edinburgh">
Edinburgh
@@ -649,8 +630,7 @@ $(document).ready(function() {
<tr>
<td>Jenette Caldwell</td>
<td><input type="text" id="row-21-age" name="row-21-age" value="30"></td>
<td><input type="text" id="row-21-position" name="row-21-position" value=
"Development Lead"></td>
<td><input type="text" id="row-21-position" name="row-21-position" value="Development Lead"></td>
<td><select size="1" id="row-21-office" name="row-21-office">
<option value="Edinburgh">
Edinburgh
@@ -676,8 +656,7 @@ $(document).ready(function() {
<tr>
<td>Yuri Berry</td>
<td><input type="text" id="row-22-age" name="row-22-age" value="40"></td>
<td><input type="text" id="row-22-position" name="row-22-position" value=
"Chief Marketing Officer (CMO)"></td>
<td><input type="text" id="row-22-position" name="row-22-position" value="Chief Marketing Officer (CMO)"></td>
<td><select size="1" id="row-22-office" name="row-22-office">
<option value="Edinburgh">
Edinburgh
@@ -703,8 +682,7 @@ $(document).ready(function() {
<tr>
<td>Caesar Vance</td>
<td><input type="text" id="row-23-age" name="row-23-age" value="21"></td>
<td><input type="text" id="row-23-position" name="row-23-position" value=
"Pre-Sales Support"></td>
<td><input type="text" id="row-23-position" name="row-23-position" value="Pre-Sales Support"></td>
<td><select size="1" id="row-23-office" name="row-23-office">
<option value="Edinburgh">
Edinburgh
@@ -730,8 +708,7 @@ $(document).ready(function() {
<tr>
<td>Doris Wilder</td>
<td><input type="text" id="row-24-age" name="row-24-age" value="23"></td>
<td><input type="text" id="row-24-position" name="row-24-position" value=
"Sales Assistant"></td>
<td><input type="text" id="row-24-position" name="row-24-position" value="Sales Assistant"></td>
<td><select size="1" id="row-24-office" name="row-24-office">
<option value="Edinburgh">
Edinburgh
@@ -757,8 +734,7 @@ $(document).ready(function() {
<tr>
<td>Angelica Ramos</td>
<td><input type="text" id="row-25-age" name="row-25-age" value="47"></td>
<td><input type="text" id="row-25-position" name="row-25-position" value=
"Chief Executive Officer (CEO)"></td>
<td><input type="text" id="row-25-position" name="row-25-position" value="Chief Executive Officer (CEO)"></td>
<td><select size="1" id="row-25-office" name="row-25-office">
<option value="Edinburgh">
Edinburgh
@@ -810,8 +786,7 @@ $(document).ready(function() {
<tr>
<td>Jennifer Chang</td>
<td><input type="text" id="row-27-age" name="row-27-age" value="28"></td>
<td><input type="text" id="row-27-position" name="row-27-position" value=
"Regional Director"></td>
<td><input type="text" id="row-27-position" name="row-27-position" value="Regional Director"></td>
<td><select size="1" id="row-27-office" name="row-27-office">
<option value="Edinburgh">
Edinburgh
@@ -837,8 +812,7 @@ $(document).ready(function() {
<tr>
<td>Brenden Wagner</td>
<td><input type="text" id="row-28-age" name="row-28-age" value="28"></td>
<td><input type="text" id="row-28-position" name="row-28-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-28-position" name="row-28-position" value="Software Engineer"></td>
<td><select size="1" id="row-28-office" name="row-28-office">
<option value="Edinburgh">
Edinburgh
@@ -864,8 +838,7 @@ $(document).ready(function() {
<tr>
<td>Fiona Green</td>
<td><input type="text" id="row-29-age" name="row-29-age" value="48"></td>
<td><input type="text" id="row-29-position" name="row-29-position" value=
"Chief Operating Officer (COO)"></td>
<td><input type="text" id="row-29-position" name="row-29-position" value="Chief Operating Officer (COO)"></td>
<td><select size="1" id="row-29-office" name="row-29-office">
<option value="Edinburgh">
Edinburgh
@@ -891,8 +864,7 @@ $(document).ready(function() {
<tr>
<td>Shou Itou</td>
<td><input type="text" id="row-30-age" name="row-30-age" value="20"></td>
<td><input type="text" id="row-30-position" name="row-30-position" value=
"Regional Marketing"></td>
<td><input type="text" id="row-30-position" name="row-30-position" value="Regional Marketing"></td>
<td><select size="1" id="row-30-office" name="row-30-office">
<option value="Edinburgh">
Edinburgh
@@ -918,8 +890,7 @@ $(document).ready(function() {
<tr>
<td>Michelle House</td>
<td><input type="text" id="row-31-age" name="row-31-age" value="37"></td>
<td><input type="text" id="row-31-position" name="row-31-position" value=
"Integration Specialist"></td>
<td><input type="text" id="row-31-position" name="row-31-position" value="Integration Specialist"></td>
<td><select size="1" id="row-31-office" name="row-31-office">
<option value="Edinburgh">
Edinburgh
@@ -971,8 +942,7 @@ $(document).ready(function() {
<tr>
<td>Prescott Bartlett</td>
<td><input type="text" id="row-33-age" name="row-33-age" value="27"></td>
<td><input type="text" id="row-33-position" name="row-33-position" value=
"Technical Author"></td>
<td><input type="text" id="row-33-position" name="row-33-position" value="Technical Author"></td>
<td><select size="1" id="row-33-office" name="row-33-office">
<option value="Edinburgh">
Edinburgh
@@ -1024,8 +994,7 @@ $(document).ready(function() {
<tr>
<td>Martena Mccray</td>
<td><input type="text" id="row-35-age" name="row-35-age" value="46"></td>
<td><input type="text" id="row-35-position" name="row-35-position" value=
"Post-Sales support"></td>
<td><input type="text" id="row-35-position" name="row-35-position" value="Post-Sales support"></td>
<td><select size="1" id="row-35-office" name="row-35-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1051,8 +1020,7 @@ $(document).ready(function() {
<tr>
<td>Unity Butler</td>
<td><input type="text" id="row-36-age" name="row-36-age" value="47"></td>
<td><input type="text" id="row-36-position" name="row-36-position" value=
"Marketing Designer"></td>
<td><input type="text" id="row-36-position" name="row-36-position" value="Marketing Designer"></td>
<td><select size="1" id="row-36-office" name="row-36-office">
<option value="Edinburgh">
Edinburgh
@@ -1130,8 +1098,7 @@ $(document).ready(function() {
<tr>
<td>Vivian Harrell</td>
<td><input type="text" id="row-39-age" name="row-39-age" value="62"></td>
<td><input type="text" id="row-39-position" name="row-39-position" value=
"Financial Controller"></td>
<td><input type="text" id="row-39-position" name="row-39-position" value="Financial Controller"></td>
<td><select size="1" id="row-39-office" name="row-39-office">
<option value="Edinburgh">
Edinburgh
@@ -1209,8 +1176,7 @@ $(document).ready(function() {
<tr>
<td>Olivia Liang</td>
<td><input type="text" id="row-42-age" name="row-42-age" value="64"></td>
<td><input type="text" id="row-42-position" name="row-42-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-42-position" name="row-42-position" value="Support Engineer"></td>
<td><select size="1" id="row-42-office" name="row-42-office">
<option value="Edinburgh">
Edinburgh
@@ -1236,8 +1202,7 @@ $(document).ready(function() {
<tr>
<td>Bruno Nash</td>
<td><input type="text" id="row-43-age" name="row-43-age" value="38"></td>
<td><input type="text" id="row-43-position" name="row-43-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-43-position" name="row-43-position" value="Software Engineer"></td>
<td><select size="1" id="row-43-office" name="row-43-office">
<option value="Edinburgh">
Edinburgh
@@ -1263,8 +1228,7 @@ $(document).ready(function() {
<tr>
<td>Sakura Yamamoto</td>
<td><input type="text" id="row-44-age" name="row-44-age" value="37"></td>
<td><input type="text" id="row-44-position" name="row-44-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-44-position" name="row-44-position" value="Support Engineer"></td>
<td><select size="1" id="row-44-office" name="row-44-office">
<option value="Edinburgh">
Edinburgh
@@ -1316,8 +1280,7 @@ $(document).ready(function() {
<tr>
<td>Finn Camacho</td>
<td><input type="text" id="row-46-age" name="row-46-age" value="47"></td>
<td><input type="text" id="row-46-position" name="row-46-position" value=
"Support Engineer"></td>
<td><input type="text" id="row-46-position" name="row-46-position" value="Support Engineer"></td>
<td><select size="1" id="row-46-office" name="row-46-office">
<option value="Edinburgh">
Edinburgh
@@ -1343,8 +1306,7 @@ $(document).ready(function() {
<tr>
<td>Serge Baldwin</td>
<td><input type="text" id="row-47-age" name="row-47-age" value="64"></td>
<td><input type="text" id="row-47-position" name="row-47-position" value=
"Data Coordinator"></td>
<td><input type="text" id="row-47-position" name="row-47-position" value="Data Coordinator"></td>
<td><select size="1" id="row-47-office" name="row-47-office">
<option value="Edinburgh">
Edinburgh
@@ -1370,8 +1332,7 @@ $(document).ready(function() {
<tr>
<td>Zenaida Frank</td>
<td><input type="text" id="row-48-age" name="row-48-age" value="63"></td>
<td><input type="text" id="row-48-position" name="row-48-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-48-position" name="row-48-position" value="Software Engineer"></td>
<td><select size="1" id="row-48-office" name="row-48-office">
<option value="Edinburgh">
Edinburgh
@@ -1397,8 +1358,7 @@ $(document).ready(function() {
<tr>
<td>Zorita Serrano</td>
<td><input type="text" id="row-49-age" name="row-49-age" value="56"></td>
<td><input type="text" id="row-49-position" name="row-49-position" value=
"Software Engineer"></td>
<td><input type="text" id="row-49-position" name="row-49-position" value="Software Engineer"></td>
<td><select size="1" id="row-49-office" name="row-49-office">
<option value="Edinburgh">
Edinburgh
@@ -1424,8 +1384,7 @@ $(document).ready(function() {
<tr>
<td>Jennifer Acosta</td>
<td><input type="text" id="row-50-age" name="row-50-age" value="43"></td>
<td><input type="text" id="row-50-position" name="row-50-position" value=
"Junior Javascript Developer"></td>
<td><input type="text" id="row-50-position" name="row-50-position" value="Junior Javascript Developer"></td>
<td><select size="1" id="row-50-office" name="row-50-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1451,8 +1410,7 @@ $(document).ready(function() {
<tr>
<td>Cara Stevens</td>
<td><input type="text" id="row-51-age" name="row-51-age" value="46"></td>
<td><input type="text" id="row-51-position" name="row-51-position" value=
"Sales Assistant"></td>
<td><input type="text" id="row-51-position" name="row-51-position" value="Sales Assistant"></td>
<td><select size="1" id="row-51-office" name="row-51-office">
<option value="Edinburgh">
Edinburgh
@@ -1478,8 +1436,7 @@ $(document).ready(function() {
<tr>
<td>Hermione Butler</td>
<td><input type="text" id="row-52-age" name="row-52-age" value="47"></td>
<td><input type="text" id="row-52-position" name="row-52-position" value=
"Regional Director"></td>
<td><input type="text" id="row-52-position" name="row-52-position" value="Regional Director"></td>
<td><select size="1" id="row-52-office" name="row-52-office">
<option value="Edinburgh">
Edinburgh
@@ -1505,8 +1462,7 @@ $(document).ready(function() {
<tr>
<td>Lael Greer</td>
<td><input type="text" id="row-53-age" name="row-53-age" value="21"></td>
<td><input type="text" id="row-53-position" name="row-53-position" value=
"Systems Administrator"></td>
<td><input type="text" id="row-53-position" name="row-53-position" value="Systems Administrator"></td>
<td><select size="1" id="row-53-office" name="row-53-office">
<option value="Edinburgh">
Edinburgh
@@ -1558,8 +1514,7 @@ $(document).ready(function() {
<tr>
<td>Shad Decker</td>
<td><input type="text" id="row-55-age" name="row-55-age" value="51"></td>
<td><input type="text" id="row-55-position" name="row-55-position" value=
"Regional Director"></td>
<td><input type="text" id="row-55-position" name="row-55-position" value="Regional Director"></td>
<td><select size="1" id="row-55-office" name="row-55-office">
<option value="Edinburgh" selected="selected">
Edinburgh
@@ -1585,8 +1540,7 @@ $(document).ready(function() {
<tr>
<td>Michael Bruce</td>
<td><input type="text" id="row-56-age" name="row-56-age" value="29"></td>
<td><input type="text" id="row-56-position" name="row-56-position" value=
"Javascript Developer"></td>
<td><input type="text" id="row-56-position" name="row-56-position" value="Javascript Developer"></td>
<td><select size="1" id="row-56-office" name="row-56-office">
<option value="Edinburgh">
Edinburgh
@@ -1612,8 +1566,7 @@ $(document).ready(function() {
<tr>
<td>Donna Snider</td>
<td><input type="text" id="row-57-age" name="row-57-age" value="27"></td>
<td><input type="text" id="row-57-position" name="row-57-position" value=
"Customer Support"></td>
<td><input type="text" id="row-57-position" name="row-57-position" value="Customer Support"></td>
<td><select size="1" id="row-57-office" name="row-57-office">
<option value="Edinburgh">
Edinburgh
@@ -1649,8 +1602,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">/* Create an array with the values of all the input boxes in a column */
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">/* Create an array with the values of all the input boxes in a column */
$.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
{
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
@@ -1688,14 +1640,13 @@ $(document).ready(function() {
&quot;columns&quot;: [
null,
{ &quot;orderDataType&quot;: &quot;dom-text-numeric&quot; },
{ &quot;orderDataType&quot;: &quot;dom-text&quot; },
{ &quot;orderDataType&quot;: &quot;dom-text&quot;, type: 'string' },
{ &quot;orderDataType&quot;: &quot;dom-select&quot; }
]
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -1704,36 +1655,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -1756,8 +1702,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -1765,8 +1710,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -1779,19 +1723,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -1827,14 +1770,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -1871,8 +1811,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -1889,14 +1828,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -19,10 +19,9 @@
<h1>DataTables example <span>Plug-ins</span></h1>
<div class="info">
<p>While DataTables has a wide range of options and data type support built in, it can never cater for
every type of data out of the box. For this reason, DataTables exposes an extension API which allows
you, the developers using DataTables, to add support for your own data types, searching, ordering and
feature plug-ins.</p>
<p>While DataTables has a wide range of options and data type support built in, it can never cater for every type of data out of the box. For this reason,
DataTables exposes an extension API which allows you, the developers using DataTables, to add support for your own data types, searching, ordering and feature
plug-ins.</p>
<p>The examples in this section show how plug-ins can be used and developed for DataTables.</p>
</div>
@@ -48,14 +47,11 @@
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -56,14 +56,11 @@ $(document).ready(function() {
<h1>DataTables example <span>Custom filtering - range search</span></h1>
<div class="info">
<p>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, <code>$.fn.dataTable.ext.search</code>. 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.</p>
<p>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, <code>$.fn.dataTable.ext.search</code>. 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.</p>
<p>This example shows a search being performed on the age column in the data, based upon two
inputs.</p>
<p>This example shows a search being performed on the age column in the data, based upon two inputs.</p>
</div>
<table border="0" cellspacing="5" cellpadding="5">
@@ -570,8 +567,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">/* Custom filtering function which will search data in column four between two values */
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">/* Custom filtering function which will search data in column four between two values */
$.fn.dataTable.ext.search.push(
function( settings, data, dataIndex ) {
var min = parseInt( $('#min').val(), 10 );
@@ -598,8 +594,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -608,36 +603,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -660,8 +650,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -669,8 +658,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -683,19 +671,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -731,14 +718,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -775,8 +759,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -786,22 +769,18 @@ $(document).ready(function() {
<li><a href="./api.html">API plug-in methods</a></li>
<li><a href="./sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="./sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li class="active"><a href="./range_filtering.html">Custom filtering - range
search</a></li>
<li class="active"><a href="./range_filtering.html">Custom filtering - range search</a></li>
<li><a href="./dom_sort.html">Live DOM ordering</a></li>
</ul>
</div>
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -51,20 +51,16 @@ $(document).ready(function() {
<h1>DataTables example <span>Ordering plug-ins (with type detection)</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>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 complete information
about type detection and ordering plug-ins; creating them and their requirements, please refer to the
plug-in development documentation.</p>
<p>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 complete information about type detection and ordering plug-ins; creating them and their requirements, please refer to the plug-in
development documentation.</p>
<p>This example shows ordering with using an enumerated type.</p>
<p>A wide variety of ready made ordering plug-ins can be found on <a href=
"//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
<p>A wide variety of ready made ordering plug-ins can be found on <a href="//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -560,8 +556,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$.fn.dataTable.ext.type.detect.unshift(
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$.fn.dataTable.ext.type.detect.unshift(
function ( d ) {
return d === 'Low' || d === 'Medium' || d === 'High' ?
'salary-grade' :
@@ -583,8 +578,7 @@ $(document).ready(function() {
$('#example').dataTable();
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -593,36 +587,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -645,8 +634,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -654,8 +642,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -668,19 +655,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -716,14 +702,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -760,8 +743,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -769,8 +751,7 @@ $(document).ready(function() {
<h3><a href="./index.html">Plug-ins</a></h3>
<ul class="toc active">
<li><a href="./api.html">API plug-in methods</a></li>
<li class="active"><a href="./sorting_auto.html">Ordering plug-ins (with type
detection)</a></li>
<li class="active"><a href="./sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li><a href="./sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="./range_filtering.html">Custom filtering - range search</a></li>
<li><a href="./dom_sort.html">Live DOM ordering</a></li>
@@ -779,14 +760,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -47,21 +47,18 @@ $(document).ready(function() {
<h1>DataTables example <span>Ordering plug-ins (no type detection)</span></h1>
<div class="info">
<p>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.</p>
<p>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.</p>
<p>This is done by using the <a href="//datatables.net/reference/option/columns.type"><code class=
"option" title="DataTables initialisation option">columns.type<span>DT</span></code></a> 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 <code>$.fn.dataTable.ext.type.order</code> object. For more information about ordering plug-ins;
creating them and their requirements, please refer to the plug-in development documentation.</p>
<p>This is done by using the <a href="//datatables.net/reference/option/columns.type"><code class="option" title=
"DataTables initialisation option">columns.type<span>DT</span></code></a> 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
<code>$.fn.dataTable.ext.type.order</code> object. For more information about ordering plug-ins; creating them and their requirements, please refer to the plug-in
development documentation.</p>
<p>This example shows ordering with using an enumerated type.</p>
<p>A wide variety of ready made ordering plug-ins can be found on <a href=
"//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
<p>A wide variety of ready made ordering plug-ins can be found on <a href="//datatables.net/plug-ins/sorting">the DataTables plug-ins page</a>.</p>
</div>
<table id="example" class="display" cellspacing="0" width="100%">
@@ -557,8 +554,7 @@ $(document).ready(function() {
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this
example:</p><code class="multiline brush: js;">$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
switch ( d ) {
case 'Low': return 1;
case 'Medium': return 2;
@@ -576,8 +572,7 @@ $(document).ready(function() {
} );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this
example:</p>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../media/js/jquery.js">../../media/js/jquery.js</a></li>
@@ -586,36 +581,31 @@ $(document).ready(function() {
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by
DataTables:</p>
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library
files (below), in order to correctly display the table. The additional CSS used is shown
below:</p><code class="multiline brush: js;"></code>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css"></code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the
table:</p>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href=
"../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
<li><a href="../../media/css/jquery.dataTables.css">../../media/css/jquery.dataTables.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data
will update automatically as any additional data is loaded.</p>
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note
that this is just an example script using PHP. Server-side processing scripts can be written in any
language, using <a href="//datatables.net/manual/server-side">the protocol described in the
DataTables documentation</a>.</p>
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
@@ -638,8 +628,7 @@ $(document).ready(function() {
<li><a href="../basic_init/multi_col_sort.html">Multi-column ordering</a></li>
<li><a href="../basic_init/multiple_tables.html">Multiple tables</a></li>
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and
colspan)</a></li>
<li><a href="../basic_init/complex_header.html">Complex headers (rowspan and colspan)</a></li>
<li><a href="../basic_init/dom.html">DOM positioning</a></li>
<li><a href="../basic_init/flexible_width.html">Flexible table width</a></li>
<li><a href="../basic_init/state_save.html">State saving</a></li>
@@ -647,8 +636,7 @@ $(document).ready(function() {
<li><a href="../basic_init/scroll_y.html">Scroll - vertical</a></li>
<li><a href="../basic_init/scroll_x.html">Scroll - horizontal</a></li>
<li><a href="../basic_init/scroll_xy.html">Scroll - horizontal and vertical</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI
ThemeRoller</a></li>
<li><a href="../basic_init/scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
<li><a href="../basic_init/comma-decimal.html">Language - Comma decimal place</a></li>
<li><a href="../basic_init/language.html">Language options</a></li>
</ul>
@@ -661,19 +649,18 @@ $(document).ready(function() {
<li><a href="../advanced_init/dt_events.html">DataTables events</a></li>
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
<li><a href="../advanced_init/length_menu.html">Page length options</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control
elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan /
colspan)</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes</a></li>
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table control elements</a></li>
<li><a href="../advanced_init/complex_header.html">Complex headers (rowspan / colspan)</a></li>
<li><a href="../advanced_init/object_dom_read.html">Read HTML to data objects</a></li>
<li><a href="../advanced_init/html5-data-attributes.html">HTML5 data-* attributes - cell data</a></li>
<li><a href="../advanced_init/html5-data-options.html">HTML5 data-* attributes - table options</a></li>
<li><a href="../advanced_init/language_file.html">Language file</a></li>
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
<li><a href="../advanced_init/row_callback.html">Row created callback</a></li>
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar elements</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence
control</a></li>
<li><a href="../advanced_init/sort_direction_control.html">Order direction sequence control</a></li>
</ul>
</div>
@@ -709,14 +696,11 @@ $(document).ready(function() {
<ul class="toc">
<li><a href="../api/add_row.html">Add rows</a></li>
<li><a href="../api/multi_filter.html">Individual column searching (text inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select
inputs)</a></li>
<li><a href="../api/multi_filter_select.html">Individual column searching (select inputs)</a></li>
<li><a href="../api/highlight.html">Highlighting rows and columns</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed
information)</a></li>
<li><a href="../api/row_details.html">Child rows (show extra / detailed information)</a></li>
<li><a href="../api/select_row.html">Row selection (multiple rows)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single
row)</a></li>
<li><a href="../api/select_single_row.html">Row selection and deletion (single row)</a></li>
<li><a href="../api/form.html">Form inputs</a></li>
<li><a href="../api/counter_columns.html">Index column</a></li>
<li><a href="../api/show_hide.html">Show / hide columns dynamically</a></li>
@@ -753,8 +737,7 @@ $(document).ready(function() {
<li><a href="../server_side/select_rows.html">Row selection</a></li>
<li><a href="../server_side/jsonp.html">JSONP data source for remote domains</a></li>
<li><a href="../server_side/defer_loading.html">Deferred loading of data</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for
paging</a></li>
<li><a href="../server_side/pipeline.html">Pipelining data to reduce Ajax calls for paging</a></li>
</ul>
</div>
@@ -763,8 +746,7 @@ $(document).ready(function() {
<ul class="toc active">
<li><a href="./api.html">API plug-in methods</a></li>
<li><a href="./sorting_auto.html">Ordering plug-ins (with type detection)</a></li>
<li class="active"><a href="./sorting_manual.html">Ordering plug-ins (no type
detection)</a></li>
<li class="active"><a href="./sorting_manual.html">Ordering plug-ins (no type detection)</a></li>
<li><a href="./range_filtering.html">Custom filtering - range search</a></li>
<li><a href="./dom_sort.html">Live DOM ordering</a></li>
</ul>
@@ -772,14 +754,11 @@ $(document).ready(function() {
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full
information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and
<a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of
DataTables.</p>
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href=
"http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2014<br>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>

View File

@@ -1,204 +0,0 @@
div.dataTables_length label {
font-weight: normal;
float: left;
text-align: left;
}
div.dataTables_length select {
width: 75px;
}
div.dataTables_filter label {
font-weight: normal;
float: right;
}
div.dataTables_filter input {
width: 16em;
}
div.dataTables_info {
padding-top: 8px;
}
div.dataTables_paginate {
float: right;
margin: 0;
}
div.dataTables_paginate ul.pagination {
margin: 2px;
}
table.table {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
}
table.table thead .sorting,
table.table thead .sorting_asc,
table.table thead .sorting_desc,
table.table thead .sorting_asc_disabled,
table.table thead .sorting_desc_disabled {
cursor: pointer;
}
table.table thead .sorting { background: url('../images/sort_both.png') no-repeat center right; }
table.table thead .sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; }
table.table thead .sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; }
table.table thead .sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; }
table.table thead .sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; }
table.dataTable th:active {
outline: none;
}
/* Scrolling */
div.dataTables_scrollHead table {
margin-bottom: 0 !important;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
div.dataTables_scrollHead table thead tr:last-child th:first-child,
div.dataTables_scrollHead table thead tr:last-child td:first-child {
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
div.dataTables_scrollBody table {
border-top: none;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody tbody tr:first-child th,
div.dataTables_scrollBody tbody tr:first-child td {
border-top: none;
}
div.dataTables_scrollFoot table {
border-top: none;
}
/*
* TableTools styles
*/
.table tbody tr.active td,
.table tbody tr.active th {
background-color: #08C;
color: white;
}
.table tbody tr.active:hover td,
.table tbody tr.active:hover th {
background-color: #0075b0 !important;
}
.table-striped tbody tr.active:nth-child(odd) td,
.table-striped tbody tr.active:nth-child(odd) th {
background-color: #017ebc;
}
table.DTTT_selectable tbody tr {
cursor: pointer;
}
div.DTTT .btn {
color: #333 !important;
font-size: 12px;
}
div.DTTT .btn:hover {
text-decoration: none !important;
}
ul.DTTT_dropdown.dropdown-menu {
z-index: 2003;
}
ul.DTTT_dropdown.dropdown-menu a {
color: #333 !important; /* needed only when demo_page.css is included */
}
ul.DTTT_dropdown.dropdown-menu li {
position: relative;
}
ul.DTTT_dropdown.dropdown-menu li:hover a {
background-color: #0088cc;
color: white !important;
}
/* TableTools information display */
div.DTTT_print_info.modal {
height: 150px;
margin-top: -75px;
text-align: center;
}
div.DTTT_print_info h6 {
font-weight: normal;
font-size: 28px;
line-height: 28px;
margin: 1em;
}
div.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}
/*
* FixedColumns styles
*/
div.DTFC_LeftHeadWrapper table,
div.DTFC_LeftFootWrapper table,
div.DTFC_RightHeadWrapper table,
div.DTFC_RightFootWrapper table,
table.DTFC_Cloned tr.even {
background-color: white;
}
div.DTFC_RightHeadWrapper table ,
div.DTFC_LeftHeadWrapper table {
margin-bottom: 0 !important;
border-top-right-radius: 0 !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,
div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,
div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,
div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child {
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
div.DTFC_RightBodyWrapper table,
div.DTFC_LeftBodyWrapper table {
border-top: none;
margin-bottom: 0 !important;
}
div.DTFC_RightBodyWrapper tbody tr:first-child th,
div.DTFC_RightBodyWrapper tbody tr:first-child td,
div.DTFC_LeftBodyWrapper tbody tr:first-child th,
div.DTFC_LeftBodyWrapper tbody tr:first-child td {
border-top: none;
}
div.DTFC_RightFootWrapper table,
div.DTFC_LeftFootWrapper table {
border-top: none;
}

View File

@@ -1,152 +0,0 @@
/* Set the defaults for DataTables initialisation */
$.extend( true, $.fn.dataTable.defaults, {
"sDom": "<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
}
} );
/* Default class modification */
$.extend( $.fn.dataTableExt.oStdClasses, {
"sWrapper": "dataTables_wrapper form-inline",
"sFilterInput": "form-control input-sm",
"sLengthSelect": "form-control input-sm"
} );
/* API method to get paging information */
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
"iTotalPages": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
};
};
/* Bootstrap style pagination control */
$.extend( $.fn.dataTableExt.oPagination, {
"bootstrap": {
"fnInit": function( oSettings, nPaging, fnDraw ) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function ( e ) {
e.preventDefault();
if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
fnDraw( oSettings );
}
};
$(nPaging).append(
'<ul class="pagination">'+
'<li class="prev disabled"><a href="#">&larr; '+oLang.sPrevious+'</a></li>'+
'<li class="next disabled"><a href="#">'+oLang.sNext+' &rarr; </a></li>'+
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
},
"fnUpdate": function ( oSettings, fnDraw ) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i, ien, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);
if ( oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
}
else if ( oPaging.iPage <= iHalf ) {
iStart = 1;
iEnd = iListLength;
} else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}
for ( i=0, ien=an.length ; i<ien ; i++ ) {
// Remove the middle elements
$('li:gt(0)', an[i]).filter(':not(:last)').remove();
// Add the new list items and their event handlers
for ( j=iStart ; j<=iEnd ; j++ ) {
sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
.insertBefore( $('li:last', an[i])[0] )
.bind('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
} );
}
// Add / remove disabled classes from the static elements
if ( oPaging.iPage === 0 ) {
$('li:first', an[i]).addClass('disabled');
} else {
$('li:first', an[i]).removeClass('disabled');
}
if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
$('li:last', an[i]).addClass('disabled');
} else {
$('li:last', an[i]).removeClass('disabled');
}
}
}
}
} );
/*
* TableTools Bootstrap compatibility
* Required TableTools 2.1+
*/
if ( $.fn.DataTable.TableTools ) {
// Set the classes that TableTools uses to something suitable for Bootstrap
$.extend( true, $.fn.DataTable.TableTools.classes, {
"container": "DTTT btn-group",
"buttons": {
"normal": "btn btn-default",
"disabled": "disabled"
},
"collection": {
"container": "DTTT_dropdown dropdown-menu",
"buttons": {
"normal": "",
"disabled": "disabled"
}
},
"print": {
"info": "DTTT_print_info modal"
},
"select": {
"row": "active"
}
} );
// Have the collection use a bootstrap compatible dropdown
$.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
"collection": {
"container": "ul",
"button": "li",
"liner": "a"
}
} );
}

View File

@@ -1,442 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>DataTables Bootstrap 2 example</title>
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc2/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="dataTables.bootstrap.css">
<script type="text/javascript" language="javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" language="javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="dataTables.bootstrap.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#example').dataTable();
} );
</script>
</head>
<body>
<div class="container">
<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
<thead>
<tr>
<th>Rendering engine</th>
<th>Browser</th>
<th>Platform(s)</th>
<th>Engine version</th>
<th>CSS grade</th>
</tr>
</thead>
<tbody>
<tr class="odd gradeX">
<td>Trident</td>
<td>Internet
Explorer 4.0</td>
<td>Win 95+</td>
<td class="center"> 4</td>
<td class="center">X</td>
</tr>
<tr class="even gradeC">
<td>Trident</td>
<td>Internet
Explorer 5.0</td>
<td>Win 95+</td>
<td class="center">5</td>
<td class="center">C</td>
</tr>
<tr class="odd gradeA">
<td>Trident</td>
<td>Internet
Explorer 5.5</td>
<td>Win 95+</td>
<td class="center">5.5</td>
<td class="center">A</td>
</tr>
<tr class="even gradeA">
<td>Trident</td>
<td>Internet
Explorer 6</td>
<td>Win 98+</td>
<td class="center">6</td>
<td class="center">A</td>
</tr>
<tr class="odd gradeA">
<td>Trident</td>
<td>Internet Explorer 7</td>
<td>Win XP SP2+</td>
<td class="center">7</td>
<td class="center">A</td>
</tr>
<tr class="even gradeA">
<td>Trident</td>
<td>AOL browser (AOL desktop)</td>
<td>Win XP</td>
<td class="center">6</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Firefox 1.0</td>
<td>Win 98+ / OSX.2+</td>
<td class="center">1.7</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Firefox 1.5</td>
<td>Win 98+ / OSX.2+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Firefox 2.0</td>
<td>Win 98+ / OSX.2+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Firefox 3.0</td>
<td>Win 2k+ / OSX.3+</td>
<td class="center">1.9</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Camino 1.0</td>
<td>OSX.2+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Camino 1.5</td>
<td>OSX.3+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Netscape 7.2</td>
<td>Win 95+ / Mac OS 8.6-9.2</td>
<td class="center">1.7</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Netscape Browser 8</td>
<td>Win 98SE+</td>
<td class="center">1.7</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Netscape Navigator 9</td>
<td>Win 98+ / OSX.2+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.0</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.1</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.1</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.2</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.2</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.3</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.3</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.4</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.4</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.5</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.5</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.6</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">1.6</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.7</td>
<td>Win 98+ / OSX.1+</td>
<td class="center">1.7</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Mozilla 1.8</td>
<td>Win 98+ / OSX.1+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Seamonkey 1.1</td>
<td>Win 98+ / OSX.2+</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Gecko</td>
<td>Epiphany 2.20</td>
<td>Gnome</td>
<td class="center">1.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>Safari 1.2</td>
<td>OSX.3</td>
<td class="center">125.5</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>Safari 1.3</td>
<td>OSX.3</td>
<td class="center">312.8</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>Safari 2.0</td>
<td>OSX.4+</td>
<td class="center">419.3</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>Safari 3.0</td>
<td>OSX.4+</td>
<td class="center">522.1</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>OmniWeb 5.5</td>
<td>OSX.4+</td>
<td class="center">420</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>iPod Touch / iPhone</td>
<td>iPod</td>
<td class="center">420.1</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Webkit</td>
<td>S60</td>
<td>S60</td>
<td class="center">413</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 7.0</td>
<td>Win 95+ / OSX.1+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 7.5</td>
<td>Win 95+ / OSX.2+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 8.0</td>
<td>Win 95+ / OSX.2+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 8.5</td>
<td>Win 95+ / OSX.2+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 9.0</td>
<td>Win 95+ / OSX.3+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 9.2</td>
<td>Win 88+ / OSX.3+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera 9.5</td>
<td>Win 88+ / OSX.3+</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Opera for Wii</td>
<td>Wii</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Nokia N800</td>
<td>N800</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>Presto</td>
<td>Nintendo DS browser</td>
<td>Nintendo DS</td>
<td class="center">8.5</td>
<td class="center">C/A<sup>1</sup></td>
</tr>
<tr class="gradeC">
<td>KHTML</td>
<td>Konqureror 3.1</td>
<td>KDE 3.1</td>
<td class="center">3.1</td>
<td class="center">C</td>
</tr>
<tr class="gradeA">
<td>KHTML</td>
<td>Konqureror 3.3</td>
<td>KDE 3.3</td>
<td class="center">3.3</td>
<td class="center">A</td>
</tr>
<tr class="gradeA">
<td>KHTML</td>
<td>Konqureror 3.5</td>
<td>KDE 3.5</td>
<td class="center">3.5</td>
<td class="center">A</td>
</tr>
<tr class="gradeX">
<td>Tasman</td>
<td>Internet Explorer 4.5</td>
<td>Mac OS 8-9</td>
<td class="center">-</td>
<td class="center">X</td>
</tr>
<tr class="gradeC">
<td>Tasman</td>
<td>Internet Explorer 5.1</td>
<td>Mac OS 7.6-9</td>
<td class="center">1</td>
<td class="center">C</td>
</tr>
<tr class="gradeC">
<td>Tasman</td>
<td>Internet Explorer 5.2</td>
<td>Mac OS 8-X</td>
<td class="center">1</td>
<td class="center">C</td>
</tr>
<tr class="gradeA">
<td>Misc</td>
<td>NetFront 3.1</td>
<td>Embedded devices</td>
<td class="center">-</td>
<td class="center">C</td>
</tr>
<tr class="gradeA">
<td>Misc</td>
<td>NetFront 3.4</td>
<td>Embedded devices</td>
<td class="center">-</td>
<td class="center">A</td>
</tr>
<tr class="gradeX">
<td>Misc</td>
<td>Dillo 0.8</td>
<td>Embedded devices</td>
<td class="center">-</td>
<td class="center">X</td>
</tr>
<tr class="gradeX">
<td>Misc</td>
<td>Links</td>
<td>Text only</td>
<td class="center">-</td>
<td class="center">X</td>
</tr>
<tr class="gradeX">
<td>Misc</td>
<td>Lynx</td>
<td>Text only</td>
<td class="center">-</td>
<td class="center">X</td>
</tr>
<tr class="gradeC">
<td>Misc</td>
<td>IE Mobile</td>
<td>Windows Mobile 6</td>
<td class="center">-</td>
<td class="center">C</td>
</tr>
<tr class="gradeC">
<td>Misc</td>
<td>PSP browser</td>
<td>PSP</td>
<td class="center">-</td>
<td class="center">C</td>
</tr>
<tr class="gradeU">
<td>Other browsers</td>
<td>All others</td>
<td>-</td>
<td class="center">-</td>
<td class="center">U</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1,17 +0,0 @@
{
"processing": "Bitte warten...",
"lengthMenu": "_MENU_ Einträge anzeigen",
"zeroRecords": "Keine Einträge vorhanden.",
"info": "_START_ bis _END_ von _TOTAL_ Einträgen",
"infoEmpty": "0 bis 0 von 0 Einträgen",
"infoFiltered": "(gefiltert von _MAX_ Einträgen)",
"infoPostFix": "",
"search": "Suchen",
"url": "",
"paginate": {
"first": "Erster",
"previous": "Zurück",
"next": "Nächster",
"last": "Letzter"
}
}

View File

@@ -1,24 +1,19 @@
@font-face {
/* RaleWay Thin from - https://www.theleagueofmoveabletype.com, Font Squirrel for Web Font creation with "Adjust Glyph Spacing" -50 */
font-family: 'ralewaythin';
src: url('font/raleway_thin-webfont.eot');
src: url('font/raleway_thin-webfont.eot?#iefix') format('embedded-opentype'),
url('font/raleway_thin-webfont.woff') format('woff'),
url('font/raleway_thin-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@import url(http://fonts.googleapis.com/css?family=Raleway:100);
body {
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #333;
background-color: #fff;
}
body.dt-example-bootstrap {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.42857143;
}
div.container {
max-width: 980px;
@@ -26,7 +21,7 @@ div.container {
}
h1 {
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'ralewaythin', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-family: 'HelveticaNeue-UltraLight', 'Helvetica Neue UltraLight', 'Raleway', 'Helvetica Neue', Arial, Helvetica, sans-serif;
font-weight: 100;
letter-spacing: 1px;
font-size: 3em;
@@ -287,6 +282,7 @@ ul.tabs li.active:hover {
div.tabs {
clear: both;
margin-top: -1px;
}
div.tabs>div {

View File

@@ -28,7 +28,7 @@ $(document).ready( function () {
// init html
var table = $('<p/>').append( $('table').clone() ).html();
$('div.tabs div.table').append(
'<code class="multiline brush: html;">\t\t\t'+
'<code class="multiline language-html">\t\t\t'+
escapeHtml( table )+
'</code>'
);
@@ -40,11 +40,16 @@ $(document).ready( function () {
var ajaxTab = $('ul.tabs li').eq(3).css('display', 'none');
$(document).on( 'init.dt', function ( e, settings ) {
if ( e.namespace !== 'dt' ) {
return;
}
var api = new $.fn.dataTable.Api( settings );
var show = function ( str ) {
ajaxTab.css( 'display', 'block' );
$('div.tabs div.ajax code').remove();
$('div.tabs div.ajax div.syntaxhighlighter').remove();
// Old IE :-|
try {
@@ -52,7 +57,7 @@ $(document).ready( function () {
} catch ( e ) {}
$('div.tabs div.ajax').append(
'<code class="multiline brush: js;">'+str+'</code>'
'<code class="multiline language-js">'+str+'</code>'
);
SyntaxHighlighter.highlight( {}, $('div.tabs div.ajax code')[0] );
};
@@ -73,6 +78,10 @@ $(document).ready( function () {
var phpTab = $('ul.tabs li').eq(4).css('display', 'none');
$(document).on( 'init.dt.demoSSP', function ( e, settings ) {
if ( e.namespace !== 'dt' ) {
return;
}
if ( settings.oFeatures.bServerSide ) {
if ( $.isFunction( settings.ajax ) ) {
return;
@@ -87,7 +96,7 @@ $(document).ready( function () {
success: function ( txt ) {
phpTab.css( 'display', 'block' );
$('div.tabs div.php').append(
'<code class="multiline brush: php;">'+txt+'</code>'
'<code class="multiline language-php">'+txt+'</code>'
);
SyntaxHighlighter.highlight( {}, $('div.tabs div.php code')[0] );
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 881 B

After

Width:  |  Height:  |  Size: 709 B

View File

@@ -1,213 +0,0 @@
div.dataTables_wrapper {
margin-bottom: 1.25em;
}
div.dataTables_length label,
div.dataTables_filter label,
div.dataTables_info {
color: #999;
font-weight: normal;
}
div.dataTables_length {
padding-top: 6px;
}
div.dataTables_length label {
float: left;
text-align: left;
}
div.dataTables_length select {
width: 75px;
}
div.dataTables_filter label {
float: right;
}
div.dataTables_filter input {
display: inline-block !important;
width: auto !important;
}
div.dataTables_info {
padding-top: 2px;
font-size: 0.875em;
}
div.dataTables_paginate {
float: right;
margin: 0;
}
table.dataTable {
clear: both;
margin-bottom: 0.5em !important;
max-width: none !important;
width: 100%;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
cursor: pointer;
*cursor: hand;
}
table.dataTable thead .sorting { background: url('images/sort_both.png') no-repeat center right; }
table.dataTable thead .sorting_asc { background: url('images/sort_asc.png') no-repeat center right; }
table.dataTable thead .sorting_desc { background: url('images/sort_desc.png') no-repeat center right; }
table.dataTable thead .sorting_asc_disabled { background: url('images/sort_asc_disabled.png') no-repeat center right; }
table.dataTable thead .sorting_desc_disabled { background: url('images/sort_desc_disabled.png') no-repeat center right; }
table.dataTable th:active {
outline: none;
}
/* Scrolling */
div.dataTables_scrollHead table {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table {
border-top: none;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody tbody tr:first-child th,
div.dataTables_scrollBody tbody tr:first-child td {
border-top: none;
}
div.dataTables_scrollFoot table {
border-top: none;
}
/*
* TableTools styles
*/
.table tbody tr.active td,
.table tbody tr.active th {
background-color: #08C;
color: white;
}
.table tbody tr.active:hover td,
.table tbody tr.active:hover th {
background-color: #0075b0 !important;
}
.table-striped tbody tr.active:nth-child(odd) td,
.table-striped tbody tr.active:nth-child(odd) th {
background-color: #017ebc;
}
table.DTTT_selectable tbody tr {
cursor: pointer;
*cursor: hand;
}
div.DTTT {
float: left;
margin-bottom: 0;
}
div.DTTT .button:hover {
text-decoration: none !important;
}
ul.DTTT_dropdown.dropdown-menu li {
position: relative;
}
ul.DTTT_dropdown.dropdown-menu li:hover a {
background-color: #0088cc;
color: white !important;
}
/* TableTools information display */
.DTTT_print_info {
position: fixed;
top: 50%;
left: 50%;
width: 400px;
height: 150px;
margin-left: -200px;
margin-top: -75px;
text-align: center;
color: #333;
padding: 10px 30px;
background: #ffffff; /* Old browsers */
background: -webkit-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* FF3.6+ */
background: -ms-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* IE10+ */
background: -o-linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* Opera 11.10+ */
background: linear-gradient(top, #ffffff 0%,#f3f3f3 89%,#f9f9f9 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f9f9f9',GradientType=0 ); /* IE6-9 */
opacity: 0.95;
border: 1px solid black;
border: 1px solid rgba(0, 0, 0, 0.5);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
-ms-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
-o-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.5);
}
div.DTTT_print_info h6 {
font-weight: normal;
font-size: 28px;
line-height: 28px;
margin: 1em;
}
div.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}
/*
* FixedColumns styles
*/
div.DTFC_LeftHeadWrapper table,
div.DTFC_LeftFootWrapper table,
table.DTFC_Cloned tr.even {
background-color: white;
}
div.DTFC_LeftHeadWrapper table {
margin-bottom: 0 !important;
}
div.DTFC_LeftBodyWrapper table {
border-top: none;
margin-bottom: 0 !important;
}
div.DTFC_LeftBodyWrapper tbody tr:first-child th,
div.DTFC_LeftBodyWrapper tbody tr:first-child td {
border-top: none;
}
div.DTFC_LeftFootWrapper table {
border-top: none;
}

View File

@@ -1,186 +0,0 @@
/* Set the defaults for DataTables initialisation */
$.extend( true, $.fn.dataTable.defaults, {
"sDom":
"<'row'<'large-6 columns'l><'large-6 columns'f>r>"+
"t"+
"<'row'<'large-6 columns'i><'large-6 columns'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page"
}
} );
/* API method to get paging information */
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
"iTotalPages": oSettings._iDisplayLength === -1 ?
0 : Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
};
};
/* Bootstrap style pagination control */
$.extend( $.fn.dataTableExt.oPagination, {
"bootstrap": {
"fnInit": function( oSettings, nPaging, fnDraw ) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function ( e ) {
e.preventDefault();
if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
fnDraw( oSettings );
}
};
$(nPaging).append(
'<ul class="pagination">'+
'<li class="prev arrow unavailable"><a href="">&laquo;</a></li>'+
'<li class="next arrow unavailable"><a href="">&raquo;</a></li>'+
'</ul>'
);
var els = $('a', nPaging);
$(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
},
"fnUpdate": function ( oSettings, fnDraw ) {
var iListLength = 5;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var pages = [];
var i, ien, klass, host;
// This could use some improving - however, see
// https://github.com/DataTables/DataTables/issues/163 - this will
// be changing in the near future, so not much point in doing too
// much just now
if ( oPaging.iTotalPages <= 6 ) {
for ( i=0 ; i<oPaging.iTotalPages ; i++ ) {
pages.push( i );
}
}
else {
// Current page
pages.push( oPaging.iPage );
// After current page
var pagesAfter = oPaging.iPage + 2 >= oPaging.iTotalPages ?
oPaging.iTotalPages :
oPaging.iPage + 2;
for ( i=oPaging.iPage+1 ; i<pagesAfter ; i++ ) {
pages.push( i );
}
// After gap
if ( pagesAfter < oPaging.iTotalPages-2 ) {
pages.push( null );
}
// End
if ( $.inArray( oPaging.iTotalPages-2, pages ) === -1 && oPaging.iPage < oPaging.iTotalPages-2 ) {
pages.push( oPaging.iTotalPages-2 );
}
if ( $.inArray( oPaging.iTotalPages-1, pages ) === -1 ) {
pages.push( oPaging.iTotalPages-1 );
}
// Pages before
var pagesBefore = oPaging.iPage - 2 > 0 ?
oPaging.iPage - 2 :
0;
for ( i=oPaging.iPage-1 ; i>pagesBefore ; i-- ) {
pages.unshift( i );
}
// Before gap
if ( pagesBefore > 1 ) {
pages.unshift( null );
}
// Start
if ( $.inArray( 1, pages ) === -1 && oPaging.iTotalPages > 1 ) {
pages.unshift( 1 );
}
if ( $.inArray( 0, pages ) === -1 ) {
pages.unshift( 0 );
}
}
for ( i=0, ien=an.length ; i<ien ; i++ ) {
// Remove the middle elements
host = an[i];
$('li:gt(0)', host).filter(':not(:last)').remove();
// Add the new list items and their event handlers
$.each( pages, function( i, page ) {
klass = page === null ? 'unavailable' :
page === oPaging.iPage ? 'current' : '';
$('<li class="'+klass+'"><a href="">'+(page===null? '&hellip;' : page+1)+'</a></li>')
.insertBefore( $('li:last', host) )
.bind('click', function (e) {
e.preventDefault();
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
fnDraw( oSettings );
} );
} );
// Add / remove disabled classes from the static elements
if ( oPaging.iPage === 0 ) {
$('li:first', host).addClass('unavailable');
} else {
$('li:first', host).removeClass('unavailable');
}
if ( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
$('li:last', host).addClass('unavailable');
} else {
$('li:last', host).removeClass('unavailable');
}
}
}
}
} );
/*
* TableTools Foundation compatibility
* Required TableTools 2.1+
*/
if ( $.fn.DataTable.TableTools ) {
// Set the classes that TableTools uses to something suitable for Foundation
$.extend( true, $.fn.DataTable.TableTools.classes, {
"container": "DTTT button-group",
"buttons": {
"normal": "button",
"disabled": "disabled"
},
"collection": {
"container": "DTTT_dropdown dropdown-menu",
"buttons": {
"normal": "",
"disabled": "disabled"
}
},
"select": {
"row": "active"
}
} );
// Have the collection use a bootstrap compatible dropdown
$.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, {
"collection": {
"container": "ul",
"button": "li",
"liner": "a"
}
} );
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1,316 +0,0 @@
/*
* Table styles
*/
table.dataTable {
width: 100%;
margin: 0 auto;
clear: both;
border-collapse: separate;
border-spacing: 0;
/*
* Header and footer styles
*/
/*
* Body styles
*/
}
table.dataTable thead th,
table.dataTable thead td,
table.dataTable tfoot th,
table.dataTable tfoot td {
padding: 4px 10px;
}
table.dataTable thead th,
table.dataTable tfoot th {
font-weight: bold;
}
table.dataTable thead th:active,
table.dataTable thead td:active {
outline: none;
}
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting {
cursor: pointer;
*cursor: hand;
}
table.dataTable thead th div.DataTables_sort_wrapper {
position: relative;
padding-right: 10px;
}
table.dataTable thead th div.DataTables_sort_wrapper span {
position: absolute;
top: 50%;
margin-top: -8px;
right: -5px;
}
table.dataTable thead th.ui-state-default {
border-right-width: 0;
}
table.dataTable thead th.ui-state-default:last-child {
border-right-width: 1px;
}
table.dataTable tbody tr {
background-color: white;
}
table.dataTable tbody tr.selected {
background-color: #b0bed9;
}
table.dataTable tbody th,
table.dataTable tbody td {
padding: 8px 10px;
}
table.dataTable th.center,
table.dataTable td.center,
table.dataTable td.dataTables_empty {
text-align: center;
}
table.dataTable th.right,
table.dataTable td.right {
text-align: right;
}
table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
border-top: 1px solid #dddddd;
}
table.dataTable.row-border tbody tr:first-child th,
table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
table.dataTable.display tbody tr:first-child td {
border-top: none;
}
table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
border-top: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
table.dataTable.cell-border tbody tr th:first-child,
table.dataTable.cell-border tbody tr td:first-child {
border-left: 1px solid #dddddd;
}
table.dataTable.cell-border tbody tr:first-child th,
table.dataTable.cell-border tbody tr:first-child td {
border-top: none;
}
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
background-color: #f9f9f9;
}
table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
background-color: #abb9d3;
}
table.dataTable.hover tbody tr:hover,
table.dataTable.hover tbody tr.odd:hover,
table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover,
table.dataTable.display tbody tr.odd:hover,
table.dataTable.display tbody tr.even:hover {
background-color: whitesmoke;
}
table.dataTable.hover tbody tr:hover.selected,
table.dataTable.hover tbody tr.odd:hover.selected,
table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected,
table.dataTable.display tbody tr.odd:hover.selected,
table.dataTable.display tbody tr.even:hover.selected {
background-color: #a9b7d1;
}
table.dataTable.order-column tbody tr > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_2,
table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
table.dataTable.display tbody tr > .sorting_2,
table.dataTable.display tbody tr > .sorting_3 {
background-color: #f9f9f9;
}
table.dataTable.order-column tbody tr.selected > .sorting_1,
table.dataTable.order-column tbody tr.selected > .sorting_2,
table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
table.dataTable.display tbody tr.selected > .sorting_2,
table.dataTable.display tbody tr.selected > .sorting_3 {
background-color: #acbad4;
}
table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
background-color: #f1f1f1;
}
table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
background-color: #f3f3f3;
}
table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
background-color: whitesmoke;
}
table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
background-color: #a6b3cd;
}
table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
background-color: #a7b5ce;
}
table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
background-color: #a9b6d0;
}
table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
background-color: #f9f9f9;
}
table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
background-color: #fbfbfb;
}
table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
background-color: #fdfdfd;
}
table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
background-color: #acbad4;
}
table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
background-color: #adbbd6;
}
table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
background-color: #afbdd8;
}
table.dataTable.display tbody tr:hover > .sorting_1,
table.dataTable.display tbody tr.odd:hover > .sorting_1,
table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1,
table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1,
table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 {
background-color: #eaeaea;
}
table.dataTable.display tbody tr:hover > .sorting_2,
table.dataTable.display tbody tr.odd:hover > .sorting_2,
table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2,
table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2,
table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 {
background-color: #ebebeb;
}
table.dataTable.display tbody tr:hover > .sorting_3,
table.dataTable.display tbody tr.odd:hover > .sorting_3,
table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3,
table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3,
table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 {
background-color: #eeeeee;
}
table.dataTable.display tbody tr:hover.selected > .sorting_1,
table.dataTable.display tbody tr.odd:hover.selected > .sorting_1,
table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1,
table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1,
table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 {
background-color: #a1aec7;
}
table.dataTable.display tbody tr:hover.selected > .sorting_2,
table.dataTable.display tbody tr.odd:hover.selected > .sorting_2,
table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2,
table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2,
table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 {
background-color: #a2afc8;
}
table.dataTable.display tbody tr:hover.selected > .sorting_3,
table.dataTable.display tbody tr.odd:hover.selected > .sorting_3,
table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3,
table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3,
table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 {
background-color: #a4b2cb;
}
table.dataTable,
table.dataTable th,
table.dataTable td {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
/*
* Control feature layout
*/
.dataTables_wrapper {
position: relative;
clear: both;
*zoom: 1;
zoom: 1;
}
.dataTables_wrapper .dataTables_length {
float: left;
}
.dataTables_wrapper .dataTables_filter {
float: right;
text-align: right;
}
.dataTables_wrapper .dataTables_filter input {
margin-left: 0.5em;
}
.dataTables_wrapper .dataTables_info {
clear: both;
float: left;
padding-top: 0.55em;
}
.dataTables_wrapper .dataTables_paginate {
float: right;
text-align: right;
}
.dataTables_wrapper .dataTables_paginate .fg-button {
box-sizing: border-box;
display: inline-block;
min-width: 1.5em;
padding: 0.5em;
margin-left: 2px;
text-align: center;
text-decoration: none !important;
cursor: pointer;
*cursor: hand;
color: #333333 !important;
border: 1px solid transparent;
}
.dataTables_wrapper .dataTables_paginate .fg-button:active {
outline: none;
}
.dataTables_wrapper .dataTables_paginate .fg-button:first-child {
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.dataTables_wrapper .dataTables_paginate .fg-button:last-child {
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
.dataTables_wrapper .dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 40px;
margin-left: -50%;
margin-top: -25px;
padding-top: 20px;
text-align: center;
font-size: 1.2em;
background-color: white;
background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
/* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
/* FF3.6+ */
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
/* IE10+ */
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
/* Opera 11.10+ */
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
/* W3C */
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
color: #333333;
}
.dataTables_wrapper .dataTables_scroll {
clear: both;
}
.dataTables_wrapper .dataTables_scrollBody {
*margin-top: -1px;
-webkit-overflow-scrolling: touch;
}
.dataTables_wrapper .ui-widget-header {
font-weight: normal;
}
.dataTables_wrapper .ui-toolbar {
padding: 8px;
}
.dataTables_wrapper:after {
visibility: hidden;
display: block;
content: "";
clear: both;
height: 0;
}

Some files were not shown because too many files have changed in this diff Show More