Compare commits
426 Commits
1.10.0-bet
...
1.10.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1bca78111 | ||
|
|
648726b19e | ||
|
|
119a355970 | ||
|
|
8a4dc8a9d7 | ||
|
|
e48efdf316 | ||
|
|
4f27154fe4 | ||
|
|
726bfe5ebb | ||
|
|
3a43de4224 | ||
|
|
4e611f31ff | ||
|
|
03dc5a31ac | ||
|
|
17d0ce4cce | ||
|
|
7d3c5cc276 | ||
|
|
6352732eac | ||
|
|
e7e439dd0a | ||
|
|
9ef7f1ad20 | ||
|
|
a7a9ac1910 | ||
|
|
50cac9640a | ||
|
|
0482633dff | ||
|
|
3950e119e2 | ||
|
|
a6e75123eb | ||
|
|
7898f4e585 | ||
|
|
52531db870 | ||
|
|
085d7f3137 | ||
|
|
44b1402fa6 | ||
|
|
1c22b79471 | ||
|
|
953d1fc6ca | ||
|
|
3977c5de72 | ||
|
|
f91373337b | ||
|
|
60273a0a75 | ||
|
|
13c3a5400e | ||
|
|
7811a69f30 | ||
|
|
588e78f92b | ||
|
|
9cc3be030f | ||
|
|
07c04c69f8 | ||
|
|
e111fae862 | ||
|
|
d0e9e78db4 | ||
|
|
bb33384e62 | ||
|
|
781f7fcaef | ||
|
|
ecf94192ae | ||
|
|
201cc7fb69 | ||
|
|
21705f049a | ||
|
|
065e3d2b1d | ||
|
|
eff925f168 | ||
|
|
a67cb611de | ||
|
|
c6cea56621 | ||
|
|
a2948e4c1e | ||
|
|
fa9fa2e296 | ||
|
|
11dbd3ca52 | ||
|
|
534e281b39 | ||
|
|
d1352ac898 | ||
|
|
fcd96cc5e3 | ||
|
|
b61ac2a9db | ||
|
|
7b57d5f10b | ||
|
|
8ed28b6f00 | ||
|
|
3d3f72aec6 | ||
|
|
994121d024 | ||
|
|
4222dec97d | ||
|
|
4b378ff787 | ||
|
|
821e866ac0 | ||
|
|
99fa7cccff | ||
|
|
1447c26a78 | ||
|
|
549bd19854 | ||
|
|
abc683d393 | ||
|
|
5ab2e30e66 | ||
|
|
ca703a9d6b | ||
|
|
7e2c6b4d0f | ||
|
|
dda351a54e | ||
|
|
1379e9725b | ||
|
|
29fd57569a | ||
|
|
cd9a9ab458 | ||
|
|
638f7386b5 | ||
|
|
36929eade3 | ||
|
|
5a47fe5a9b | ||
|
|
dd6612f24a | ||
|
|
4cd2132607 | ||
|
|
a5613441dc | ||
|
|
1effb64cfa | ||
|
|
cf1e9d1fab | ||
|
|
f9cdaead17 | ||
|
|
801e4bedf1 | ||
|
|
759ea3d733 | ||
|
|
d95820dd2a | ||
|
|
4f3525786d | ||
|
|
f817194a09 | ||
|
|
3de8e7c3fe | ||
|
|
04598f91ff | ||
|
|
63c215b044 | ||
|
|
feccbc5968 | ||
|
|
59457b63e6 | ||
|
|
09ff48a486 | ||
|
|
be7a63761b | ||
|
|
05d796d0a2 | ||
|
|
c61947f5f3 | ||
|
|
7081a1a7c6 | ||
|
|
768f7cdc46 | ||
|
|
17130d2fd5 | ||
|
|
8236be574d | ||
|
|
9a7cf935ea | ||
|
|
ded5ee322c | ||
|
|
fc64e71e1c | ||
|
|
2f85ace4a1 | ||
|
|
bf0b4d0a42 | ||
|
|
5484fdaec3 | ||
|
|
362ec532f2 | ||
|
|
432a0dc18a | ||
|
|
e4a12ed19d | ||
|
|
8376ac8412 | ||
|
|
8423b06fae | ||
|
|
2176acf2fb | ||
|
|
b2adfad09c | ||
|
|
0234e9e502 | ||
|
|
c8b924772d | ||
|
|
b7c5f8c07f | ||
|
|
caa9f2f84b | ||
|
|
de3a4bb72e | ||
|
|
fc8cc9bbd2 | ||
|
|
2d6108d00c | ||
|
|
9b539ba8b0 | ||
|
|
34abc58d70 | ||
|
|
ba42edc3f1 | ||
|
|
acf989695e | ||
|
|
07bed19ed7 | ||
|
|
cbb5a5d6e9 | ||
|
|
5c919423c1 | ||
|
|
565b639c34 | ||
|
|
e7760542e0 | ||
|
|
220ae99e08 | ||
|
|
7c4bf3e3b8 | ||
|
|
294a32f8d0 | ||
|
|
e0f2cfd81e | ||
|
|
1e10603810 | ||
|
|
7851a6a204 | ||
|
|
57596e2ebe | ||
|
|
4ec31cea77 | ||
|
|
79f969ef58 | ||
|
|
2ee5b3e7f6 | ||
|
|
9896d0295d | ||
|
|
59f2748a7f | ||
|
|
825877f157 | ||
|
|
0942fa38a6 | ||
|
|
7ef92e4f56 | ||
|
|
ba62dcba43 | ||
|
|
16c48ad4bf | ||
|
|
ee9ca0336e | ||
|
|
b1ff92a274 | ||
|
|
c6be28ef8f | ||
|
|
62da8efbca | ||
|
|
a1458bf80c | ||
|
|
b433f105a3 | ||
|
|
5ec5862938 | ||
|
|
6217b1aaae | ||
|
|
455121839a | ||
|
|
a9b35a4927 | ||
|
|
1ee4427ab0 | ||
|
|
3824202e0e | ||
|
|
f1b561ec53 | ||
|
|
15991a26eb | ||
|
|
6fbd6a9c46 | ||
|
|
a5d77d99bc | ||
|
|
2c67caad44 | ||
|
|
34fb1cb18a | ||
|
|
c98854def4 | ||
|
|
d6f46dffbb | ||
|
|
71535def21 | ||
|
|
4039e77a6f | ||
|
|
8f3ad35944 | ||
|
|
7a26c5d4c8 | ||
|
|
1b8319e9e3 | ||
|
|
71195d29c3 | ||
|
|
71863bc49f | ||
|
|
f4f8ca5632 | ||
|
|
c7e18c4236 | ||
|
|
d1ea76a958 | ||
|
|
744155653e | ||
|
|
d65dd47fe6 | ||
|
|
be061edb7b | ||
|
|
7c07b80222 | ||
|
|
ff13ccc3ca | ||
|
|
a5e8ca8a2e | ||
|
|
6c7ada53eb | ||
|
|
1c95f9fe06 | ||
|
|
25ceef46ab | ||
|
|
1ac1ea6752 | ||
|
|
24b2d11460 | ||
|
|
4112da87a2 | ||
|
|
a5ff36fdb9 | ||
|
|
90ce3773f5 | ||
|
|
a0d6150c76 | ||
|
|
bc256721ce | ||
|
|
31670cc1c5 | ||
|
|
cb957c019e | ||
|
|
cd2423d21a | ||
|
|
dd7fbeb0a7 | ||
|
|
e820e57fec | ||
|
|
42f6be43d2 | ||
|
|
3a22a082c3 | ||
|
|
d83f47cfb5 | ||
|
|
06c1cbebde | ||
|
|
9841c3f038 | ||
|
|
f4d1495a2c | ||
|
|
24761003f3 | ||
|
|
0e0acbd521 | ||
|
|
fb6a7be880 | ||
|
|
f8770a6b2a | ||
|
|
e92582b45a | ||
|
|
e62a747c2e | ||
|
|
5c77a02f29 | ||
|
|
eed543f566 | ||
|
|
50d1466cfe | ||
|
|
744b6a901b | ||
|
|
1c3f7edfc2 | ||
|
|
e06931ee0b | ||
|
|
cfe6b6dce3 | ||
|
|
fa89685d8b | ||
|
|
0d92daf10f | ||
|
|
9fa68d564f | ||
|
|
d7a9aefb6f | ||
|
|
b2ac7fa0f2 | ||
|
|
00c69698e3 | ||
|
|
a6b871d660 | ||
|
|
4f189464e4 | ||
|
|
9a49208617 | ||
|
|
5c8b72b8e8 | ||
|
|
997f3fa87c | ||
|
|
0e94078ad9 | ||
|
|
6adf853864 | ||
|
|
4e30d0ccf7 | ||
|
|
27901e11a4 | ||
|
|
6f2092783b | ||
|
|
c46168a91d | ||
|
|
2b5fd456c3 | ||
|
|
d74849248c | ||
|
|
bc06f16e43 | ||
|
|
e0f02604cf | ||
|
|
e0a08d511b | ||
|
|
a8ce572cb3 | ||
|
|
491945bace | ||
|
|
3f219a38e2 | ||
|
|
cda203dbdc | ||
|
|
b1f1b2d961 | ||
|
|
4453229416 | ||
|
|
14f5f630c9 | ||
|
|
3019ab9ec7 | ||
|
|
32a5bc6aee | ||
|
|
267ab376b8 | ||
|
|
e3a1d7b9a5 | ||
|
|
3978684f44 | ||
|
|
f8a66288db | ||
|
|
7df451fe4c | ||
|
|
64f979a72b | ||
|
|
3743d6bc28 | ||
|
|
a8575c5a7a | ||
|
|
a644aa7e21 | ||
|
|
43118eed49 | ||
|
|
fc9d6fac64 | ||
|
|
a19e700582 | ||
|
|
7668646e1e | ||
|
|
9f5eb39a2f | ||
|
|
89c4e24698 | ||
|
|
c4cdba49e4 | ||
|
|
e89c187b16 | ||
|
|
3cd15f1c16 | ||
|
|
641924cbee | ||
|
|
39df74eb2c | ||
|
|
13e33e2177 | ||
|
|
786d79d1a9 | ||
|
|
cd920b0605 | ||
|
|
264e1f0a60 | ||
|
|
78724dd11d | ||
|
|
c50629a4b5 | ||
|
|
ad7963b3dd | ||
|
|
9b8153f1d6 | ||
|
|
02b6a5c39c | ||
|
|
f907627fe4 | ||
|
|
4706058c95 | ||
|
|
278147a7ce | ||
|
|
6f6d113134 | ||
|
|
485b44965e | ||
|
|
777907d7f3 | ||
|
|
f0094e9aa1 | ||
|
|
20c764df90 | ||
|
|
7295b8b9b7 | ||
|
|
eaef26a11f | ||
|
|
c06dd8eaba | ||
|
|
5d4d4f39d7 | ||
|
|
b2509005ab | ||
|
|
84686a5b30 | ||
|
|
5c08c74d24 | ||
|
|
8e71c39929 | ||
|
|
73ed6c4725 | ||
|
|
c38e140a52 | ||
|
|
4447b84c34 | ||
|
|
2a97165e37 | ||
|
|
7bca91d1b5 | ||
|
|
097f45855f | ||
|
|
6b12300c69 | ||
|
|
c5414152ed | ||
|
|
1d159700bd | ||
|
|
2300aa8ff5 | ||
|
|
e8bd8b21bc | ||
|
|
6423ab7d67 | ||
|
|
429feaad86 | ||
|
|
c6619c64f9 | ||
|
|
23b3c847ee | ||
|
|
9243418e5f | ||
|
|
3fd28eba98 | ||
|
|
c1e40d7e10 | ||
|
|
56f59a3a33 | ||
|
|
3ea905201b | ||
|
|
96b7ef9176 | ||
|
|
501ed72cee | ||
|
|
00a99a0037 | ||
|
|
de1d6541ef | ||
|
|
d6b54b4cde | ||
|
|
36e1e86297 | ||
|
|
7100d34d9f | ||
|
|
4d1a25e176 | ||
|
|
d1b7c15426 | ||
|
|
d8860b215e | ||
|
|
391e39266f | ||
|
|
48ae36e24c | ||
|
|
46e2b0a0db | ||
|
|
f7a58ca938 | ||
|
|
a68379f7de | ||
|
|
53090ad85a | ||
|
|
6d10993421 | ||
|
|
d907cc6ceb | ||
|
|
77343b72cb | ||
|
|
3dc23c436d | ||
|
|
4feb8959d5 | ||
|
|
3cb0e3aa3f | ||
|
|
4550cc88bf | ||
|
|
06b1195376 | ||
|
|
0406a47e6a | ||
|
|
7f7861b2e2 | ||
|
|
9669c962cc | ||
|
|
f98586dd30 | ||
|
|
e82334589d | ||
|
|
a23f09ae2d | ||
|
|
f63d04583c | ||
|
|
597b0c0b74 | ||
|
|
014a9c11dd | ||
|
|
f5af4e28e0 | ||
|
|
82264d6325 | ||
|
|
56481941b1 | ||
|
|
78b043d234 | ||
|
|
505a2b37a3 | ||
|
|
54e93323b4 | ||
|
|
eb74bc591a | ||
|
|
80e748cc11 | ||
|
|
7ab49af0b6 | ||
|
|
d6a5b7c729 | ||
|
|
22161b3224 | ||
|
|
950110e1fd | ||
|
|
22023595e8 | ||
|
|
3fb997f0b8 | ||
|
|
b53ac91310 | ||
|
|
311cc96572 | ||
|
|
f6a05f5a46 | ||
|
|
f51f88429d | ||
|
|
efa8ff5b71 | ||
|
|
f7e9a20324 | ||
|
|
3ce42db432 | ||
|
|
261f2c9eb0 | ||
|
|
464ce6a32a | ||
|
|
0ea30f9ba7 | ||
|
|
56e6f38911 | ||
|
|
757dbc5524 | ||
|
|
bff1276ab6 | ||
|
|
63beec6486 | ||
|
|
3516626d9a | ||
|
|
683414daba | ||
|
|
85111b709c | ||
|
|
6cac556b6a | ||
|
|
1a0551fd2c | ||
|
|
1a5e32295a | ||
|
|
09bf9b200c | ||
|
|
6a033ad09b | ||
|
|
af7f2780f4 | ||
|
|
c5058c36e6 | ||
|
|
fedec2b479 | ||
|
|
9fda4f3a3d | ||
|
|
6924ccb237 | ||
|
|
e89310fbcf | ||
|
|
f5103cd6c4 | ||
|
|
b2a3546402 | ||
|
|
75d28cad1c | ||
|
|
67a2b18ca3 | ||
|
|
c625f2f525 | ||
|
|
90870af5ac | ||
|
|
b5228162a7 | ||
|
|
d271fac5b6 | ||
|
|
ecceb7a2ca | ||
|
|
0dab1e20de | ||
|
|
c0c1db422f | ||
|
|
c1841e6eff | ||
|
|
e948a3682a | ||
|
|
3e33795877 | ||
|
|
fd857d4864 | ||
|
|
ce54ab1ea5 | ||
|
|
1d0a155226 | ||
|
|
302f0be0ac | ||
|
|
9dc81c8dd3 | ||
|
|
13c766d1de | ||
|
|
4b83b28ace | ||
|
|
34c18509d8 | ||
|
|
e45f19eb60 | ||
|
|
92e380c778 | ||
|
|
c32f4c032a | ||
|
|
6a568a7542 | ||
|
|
ccc4f99c54 | ||
|
|
9a3bdacce6 | ||
|
|
39828e8bab | ||
|
|
876eb29b9b | ||
|
|
10634dd733 | ||
|
|
8186f9378c | ||
|
|
c5d86ea157 | ||
|
|
3330ed6783 | ||
|
|
55e965de0a | ||
|
|
a9687655ea | ||
|
|
7c8e10d0dd | ||
|
|
dcbea43baf | ||
|
|
4834aa26be | ||
|
|
a14bfa29fb | ||
|
|
23c9580d01 | ||
|
|
7227353a8f |
@@ -1 +1 @@
|
||||
0a10f0a40ff1c6fa3b8d5c8e2e5abab318de88d2
|
||||
07dbb4d0dfaff7a518bb30d671446ea246ca76a3
|
||||
|
||||
2
.gitignore
vendored
@@ -2,8 +2,6 @@ extras
|
||||
extensions
|
||||
docs
|
||||
cdn
|
||||
media/js/jquery.dataTables.min.js
|
||||
media/css/jquery.dataTables.min.css
|
||||
media/css/jquery.dataTables_themeroller.min.css
|
||||
.DS_Store
|
||||
Plugins
|
||||
|
||||
@@ -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.
|
||||
@@ -13,14 +13,7 @@ To meet this goal, DataTables is developed with two distinct groups of users in
|
||||
|
||||
## Installation
|
||||
|
||||
In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.0-beta.1/css/jquery.dataTables.css">
|
||||
|
||||
<script type="text/javascript" language="javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10-beta.1/js/jquery.dataTables.js"></script>
|
||||
```
|
||||
In most cases, to use DataTables all you need to do is include jQuery, the DataTables Javascript and DataTables CSS files in your HTML page. See the [DataTables manual](http://datatables.net/manual/installation#Including-Javascript-/-CSS) for details on how to do this using the latest version of DataTables.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
27
bower.json
@@ -1,11 +1,32 @@
|
||||
{
|
||||
"name": "datatables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.9",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "datatables/datatables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.9",
|
||||
"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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "DataTables",
|
||||
"version": "1.10.0-beta.2",
|
||||
"version": "1.10.9",
|
||||
"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/",
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Column rendering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
// The `data` parameter refers to the data for the cell (defined by the
|
||||
@@ -42,20 +43,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Column rendering</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.render</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="Initialisation option">columns.render</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</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</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%">
|
||||
@@ -551,9 +549,8 @@ $(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( {
|
||||
"columnDefs": [
|
||||
{
|
||||
// The `data` parameter refers to the data for the cell (defined by the
|
||||
@@ -569,46 +566,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -631,17 +622,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -655,8 +644,10 @@ $(document).ready(function() {
|
||||
<li class="active"><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="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
|
||||
<li><a href="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -672,14 +663,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -697,21 +689,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -742,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>
|
||||
|
||||
@@ -751,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>
|
||||
@@ -762,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
<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 - Complex headers (rowspan / colspan)</title>
|
||||
<title>DataTables example - Complex headers with column visibility</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="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"visible": false,
|
||||
"targets": -1
|
||||
@@ -34,26 +35,22 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Complex headers (rowspan / colspan)</span></h1>
|
||||
<h1>DataTables example <span>Complex headers with column visibility</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 <code>colspan</code> / <code>rowspan</code>) 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=
|
||||
"Initialisation option">columns.visible</code></a> option and <a href=
|
||||
"//datatables.net/reference/api/column().visible()"><code class="api" title=
|
||||
"API method">column().visible()</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 <code>colspan</code> and <code>rowspan</code>s into account when working with hidden columns. The
|
||||
<code>colspan</code> and <code>rowspan</code> 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</code></a> option and <a href=
|
||||
"//datatables.net/reference/api/column().visible()"><code class="api" title="DataTables API method">column().visible()</code></a> method to take into account
|
||||
<code>rowspan</code> / <code>colspan</code> 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 <code>colspan</code>) 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%">
|
||||
@@ -553,9 +550,8 @@ $(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( {
|
||||
"columnDefs": [ {
|
||||
"visible": false,
|
||||
"targets": -1
|
||||
@@ -563,46 +559,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +615,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -649,9 +637,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 with column visibility</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>
|
||||
@@ -667,14 +656,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -692,21 +682,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -737,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>
|
||||
|
||||
@@ -746,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>
|
||||
@@ -757,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Setting defaults</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,21 +12,21 @@
|
||||
<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/jquery-1.11.3.min.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">
|
||||
|
||||
|
||||
$.extend( $.fn.dataTable.defaults, {
|
||||
$.extend( true, $.fn.dataTable.defaults, {
|
||||
"searching": false,
|
||||
"ordering": false
|
||||
} );
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -35,19 +36,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Setting defaults</span></h1>
|
||||
<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=
|
||||
"Initialisation option">dom</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</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%">
|
||||
@@ -543,57 +540,50 @@ $(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( true, $.fn.dataTable.defaults, {
|
||||
"searching": false,
|
||||
"ordering": false
|
||||
} );
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -616,17 +606,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -640,8 +628,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -657,14 +647,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -682,21 +673,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -727,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>
|
||||
|
||||
@@ -736,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>
|
||||
@@ -747,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Multiple table control elements</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -19,7 +20,7 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
|
||||
} );
|
||||
} );
|
||||
@@ -39,20 +40,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multiple table control elements</span></h1>
|
||||
<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=
|
||||
"Initialisation option">dom</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=
|
||||
"Initialisation option">dom</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</code></a> initialisation parameter to move DataTables features around the table to where you want them.</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>In addition to this, you can also use <a href="//datatables.net/reference/option/dom"><code class="option" title=
|
||||
"DataTables initialisation option">dom</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 (<code class="string" title="String">t</code>)
|
||||
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>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -548,32 +547,28 @@ $(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( {
|
||||
"dom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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,
|
||||
@@ -582,25 +577,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>
|
||||
@@ -623,17 +615,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -646,10 +636,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><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="./dom_multiple_elements.html">Multiple table control elements</a></li>
|
||||
<li><a href="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -665,14 +656,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -690,21 +682,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -735,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>
|
||||
|
||||
@@ -744,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>
|
||||
@@ -755,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Custom toolbar elements</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -17,7 +18,7 @@
|
||||
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"dom": '<"toolbar">frtip'
|
||||
} );
|
||||
|
||||
@@ -39,26 +40,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom toolbar elements</span></h1>
|
||||
<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=
|
||||
"Initialisation option">dom</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</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=
|
||||
"Initialisation option">dom</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</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%">
|
||||
@@ -554,57 +550,50 @@ $(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( {
|
||||
"dom": '<"toolbar">frtip'
|
||||
} );
|
||||
|
||||
$("div.toolbar").html('<b>Custom tool bar! Text/images etc.</b>');
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">.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>
|
||||
@@ -627,17 +616,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -651,8 +638,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -668,14 +657,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -693,21 +683,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -738,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>
|
||||
|
||||
@@ -747,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>
|
||||
@@ -758,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - DataTables events</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -29,7 +30,7 @@ $(document).ready(function() {
|
||||
.on( 'order.dt', function () { eventFired( 'Order' ); } )
|
||||
.on( 'search.dt', function () { eventFired( 'Search' ); } )
|
||||
.on( 'page.dt', function () { eventFired( 'Page' ); } )
|
||||
.dataTable();
|
||||
.DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -39,25 +40,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DataTables events</span></h1>
|
||||
<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="API method">on()</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()</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="Event">order</code></a>, <a href="//datatables.net/reference/event/search"><code class=
|
||||
"event" title="Event">search</code></a> and <a href=
|
||||
"//datatables.net/reference/event/page"><code class="event" title="Event">page</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</code></a>, <a href=
|
||||
"//datatables.net/reference/event/search"><code class="event" title="DataTables event">search</code></a> and <a href=
|
||||
"//datatables.net/reference/event/page"><code class="event" title="DataTables event">page</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>
|
||||
@@ -555,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 += '<div>'+type+' event - '+new Date().getTime()+'</div>';
|
||||
@@ -567,49 +562,43 @@ $(document).ready(function() {
|
||||
.on( 'order.dt', function () { eventFired( 'Order' ); } )
|
||||
.on( 'search.dt', function () { eventFired( 'Search' ); } )
|
||||
.on( 'page.dt', function () { eventFired( 'Page' ); } )
|
||||
.dataTable();
|
||||
.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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -632,17 +621,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -656,8 +643,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -673,14 +662,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -698,21 +688,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -743,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>
|
||||
|
||||
@@ -752,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>
|
||||
@@ -763,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - DOM / jQuery events</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,11 +20,11 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
$('#example tbody').on('click', 'tr', function () {
|
||||
var name = $('td', this).eq(0).text();
|
||||
alert( 'You clicked on '+name+'\'s row' );
|
||||
var data = table.row( this ).data();
|
||||
alert( 'You clicked on '+data[0]+'\'s row' );
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -34,16 +35,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DOM / jQuery events</span></h1>
|
||||
<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. This example
|
||||
also uses the DataTables <a href="//datatables.net/reference/api/row().data()"><code class="api" title="DataTables API method">row().data()</code></a> method to
|
||||
retrieve information about the selected row - the row's data so we can show it in the <code>alert</code> message in this case.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -539,56 +540,49 @@ $(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() {
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
$('#example tbody').on('click', 'tr', function () {
|
||||
var name = $('td', this).eq(0).text();
|
||||
alert( 'You clicked on '+name+'\'s row' );
|
||||
var data = table.row( this ).data();
|
||||
alert( 'You clicked on '+data[0]+'\'s row' );
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +605,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -635,8 +627,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -652,14 +646,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -677,21 +672,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -722,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>
|
||||
|
||||
@@ -731,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>
|
||||
@@ -742,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Footer callback</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -13,7 +14,7 @@
|
||||
th { white-space: nowrap; }
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -21,9 +22,10 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api();
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
@@ -33,7 +35,7 @@ $(document).ready(function() {
|
||||
};
|
||||
|
||||
// Total over all pages
|
||||
var total = api
|
||||
total = api
|
||||
.column( 4 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
@@ -41,12 +43,12 @@ $(document).ready(function() {
|
||||
} );
|
||||
|
||||
// Total over this page
|
||||
var pageTotal = api
|
||||
pageTotal = api
|
||||
.column( 4, { page: 'current'} )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
}, 0 );
|
||||
|
||||
// Update footer
|
||||
$( api.column( 4 ).footer() ).html(
|
||||
@@ -63,22 +65,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Footer callback</span></h1>
|
||||
<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=
|
||||
"Initialisation option">headerCallback</code></a> and <a href=
|
||||
"//datatables.net/reference/option/footerCallback"><code class="option" title=
|
||||
"Initialisation option">footerCallback</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</code></a> and <a href=
|
||||
"//datatables.net/reference/option/footerCallback"><code class="option" title="DataTables initialisation option">footerCallback</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=
|
||||
"API method">column().data()</code></a> API method and <a href=
|
||||
"//datatables.net/reference/api/column().footer()"><code class="api" title=
|
||||
"API method">column().footer()</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()</code></a> API method and <a href=
|
||||
"//datatables.net/reference/api/column().footer()"><code class="api" title="DataTables API method">column().footer()</code></a> for writing the value into the
|
||||
footer.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -512,11 +510,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( {
|
||||
"footerCallback": function ( row, data, start, end, display ) {
|
||||
var api = this.api();
|
||||
var api = this.api(), data;
|
||||
|
||||
// Remove the formatting to get integer data for summation
|
||||
var intVal = function ( i ) {
|
||||
return typeof i === 'string' ?
|
||||
@@ -526,7 +524,7 @@ $(document).ready(function() {
|
||||
};
|
||||
|
||||
// Total over all pages
|
||||
var total = api
|
||||
total = api
|
||||
.column( 4 )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
@@ -534,12 +532,12 @@ $(document).ready(function() {
|
||||
} );
|
||||
|
||||
// Total over this page
|
||||
var pageTotal = api
|
||||
pageTotal = api
|
||||
.column( 4, { page: 'current'} )
|
||||
.data()
|
||||
.reduce( function (a, b) {
|
||||
return intVal(a) + intVal(b);
|
||||
} );
|
||||
}, 0 );
|
||||
|
||||
// Update footer
|
||||
$( api.column( 4 ).footer() ).html(
|
||||
@@ -549,46 +547,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -611,17 +603,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -635,8 +625,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -652,14 +644,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -677,21 +670,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -722,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>
|
||||
|
||||
@@ -731,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>
|
||||
@@ -742,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
<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</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">
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -29,33 +30,26 @@ $(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 searcgubg) 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>
|
||||
<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>/m</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,
|
||||
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%">
|
||||
@@ -87,456 +81,456 @@ $(document).ready(function() {
|
||||
<td>System Architect</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td data-order="1303682400">Mon 25th Apr 11</td>
|
||||
<td data-order="320800">$320,800/m</td>
|
||||
<td data-order="1303686000">Mon 25th Apr 11</td>
|
||||
<td data-order="320800">$320,800/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Garrett Winters">G. Winters</td>
|
||||
<td>Accountant</td>
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td data-order="1311544800">Mon 25th Jul 11</td>
|
||||
<td data-order="170750">$170,750/m</td>
|
||||
<td data-order="1311548400">Mon 25th Jul 11</td>
|
||||
<td data-order="170750">$170,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Ashton Cox">A. Cox</td>
|
||||
<td>Junior Technical Author</td>
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td data-order="1231714800">Mon 12th Jan 09</td>
|
||||
<td data-order="86000">$86,000/m</td>
|
||||
<td data-order="1231718400">Mon 12th Jan 09</td>
|
||||
<td data-order="86000">$86,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Cedric Kelly">C. Kelly</td>
|
||||
<td>Senior Javascript Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td data-order="1332972000">Thu 29th Mar 12</td>
|
||||
<td data-order="433060">$433,060/m</td>
|
||||
<td data-order="1332975600">Thu 29th Mar 12</td>
|
||||
<td data-order="433060">$433,060/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Airi Satou">A. Satou</td>
|
||||
<td>Accountant</td>
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td data-order="1227826800">Fri 28th Nov 08</td>
|
||||
<td data-order="162700">$162,700/m</td>
|
||||
<td data-order="1227830400">Fri 28th Nov 08</td>
|
||||
<td data-order="162700">$162,700/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Brielle Williamson">B. Williamson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td data-order="1354402800">Sun 2nd Dec 12</td>
|
||||
<td data-order="372000">$372,000/m</td>
|
||||
<td data-order="1354406400">Sun 2nd Dec 12</td>
|
||||
<td data-order="372000">$372,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Herrod Chandler">H. Chandler</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td data-order="1344204000">Mon 6th Aug 12</td>
|
||||
<td data-order="137500">$137,500/m</td>
|
||||
<td data-order="1344207600">Mon 6th Aug 12</td>
|
||||
<td data-order="137500">$137,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Rhona Davidson">R. Davidson</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td data-order="1287007200">Thu 14th Oct 10</td>
|
||||
<td data-order="327900">$327,900/m</td>
|
||||
<td data-order="1287010800">Thu 14th Oct 10</td>
|
||||
<td data-order="327900">$327,900/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Colleen Hurst">C. Hurst</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td data-order="1252965600">Tue 15th Sep 09</td>
|
||||
<td data-order="205500">$205,500/m</td>
|
||||
<td data-order="1252969200">Tue 15th Sep 09</td>
|
||||
<td data-order="205500">$205,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Sonya Frost">S. Frost</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td data-order="1229122800">Sat 13th Dec 08</td>
|
||||
<td data-order="103600">$103,600/m</td>
|
||||
<td data-order="1229126400">Sat 13th Dec 08</td>
|
||||
<td data-order="103600">$103,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jena Gaines">J. Gaines</td>
|
||||
<td>Office Manager</td>
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td data-order="1229641200">Fri 19th Dec 08</td>
|
||||
<td data-order="90560">$90,560/m</td>
|
||||
<td data-order="1229644800">Fri 19th Dec 08</td>
|
||||
<td data-order="90560">$90,560/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Quinn Flynn">Q. Flynn</td>
|
||||
<td>Support Lead</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td data-order="1362265200">Sun 3rd Mar 13</td>
|
||||
<td data-order="342000">$342,000/m</td>
|
||||
<td data-order="1362268800">Sun 3rd Mar 13</td>
|
||||
<td data-order="342000">$342,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Charde Marshall">C. Marshall</td>
|
||||
<td>Regional Director</td>
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td data-order="1224108000">Thu 16th Oct 08</td>
|
||||
<td data-order="470600">$470,600/m</td>
|
||||
<td data-order="1224111600">Thu 16th Oct 08</td>
|
||||
<td data-order="470600">$470,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Haley Kennedy">H. Kennedy</td>
|
||||
<td>Senior Marketing Designer</td>
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td data-order="1355785200">Tue 18th Dec 12</td>
|
||||
<td data-order="313500">$313,500/m</td>
|
||||
<td data-order="1355788800">Tue 18th Dec 12</td>
|
||||
<td data-order="313500">$313,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Tatyana Fitzpatrick">T. Fitzpatrick</td>
|
||||
<td>Regional Director</td>
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td data-order="1268780400">Wed 17th Mar 10</td>
|
||||
<td data-order="385750">$385,750/m</td>
|
||||
<td data-order="1268784000">Wed 17th Mar 10</td>
|
||||
<td data-order="385750">$385,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michael Silva">M. Silva</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td data-order="1353970800">Tue 27th Nov 12</td>
|
||||
<td data-order="198500">$198,500/m</td>
|
||||
<td data-order="1353974400">Tue 27th Nov 12</td>
|
||||
<td data-order="198500">$198,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Paul Byrd">P. Byrd</td>
|
||||
<td>Chief Financial Officer (CFO)</td>
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td data-order="1276034400">Wed 9th Jun 10</td>
|
||||
<td data-order="725000">$725,000/m</td>
|
||||
<td data-order="1276038000">Wed 9th Jun 10</td>
|
||||
<td data-order="725000">$725,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gloria Little">G. Little</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td data-order="1239314400">Fri 10th Apr 09</td>
|
||||
<td data-order="237500">$237,500/m</td>
|
||||
<td data-order="1239318000">Fri 10th Apr 09</td>
|
||||
<td data-order="237500">$237,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Bradley Greer">B. Greer</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td data-order="1350079200">Sat 13th Oct 12</td>
|
||||
<td data-order="132000">$132,000/m</td>
|
||||
<td data-order="1350082800">Sat 13th Oct 12</td>
|
||||
<td data-order="132000">$132,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Dai Rios">D. Rios</td>
|
||||
<td>Personnel Lead</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td data-order="1348610400">Wed 26th Sep 12</td>
|
||||
<td data-order="217500">$217,500/m</td>
|
||||
<td data-order="1348614000">Wed 26th Sep 12</td>
|
||||
<td data-order="217500">$217,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jenette Caldwell">J. Caldwell</td>
|
||||
<td>Development Lead</td>
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td data-order="1315000800">Sat 3rd Sep 11</td>
|
||||
<td data-order="345000">$345,000/m</td>
|
||||
<td data-order="1315004400">Sat 3rd Sep 11</td>
|
||||
<td data-order="345000">$345,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Yuri Berry">Y. Berry</td>
|
||||
<td>Chief Marketing Officer (CMO)</td>
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td data-order="1245880800">Thu 25th Jun 09</td>
|
||||
<td data-order="675000">$675,000/m</td>
|
||||
<td data-order="1245884400">Thu 25th Jun 09</td>
|
||||
<td data-order="675000">$675,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Caesar Vance">C. Vance</td>
|
||||
<td>Pre-Sales Support</td>
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td data-order="1323644400">Mon 12th Dec 11</td>
|
||||
<td data-order="106450">$106,450/m</td>
|
||||
<td data-order="1323648000">Mon 12th Dec 11</td>
|
||||
<td data-order="106450">$106,450/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Doris Wilder">D. Wilder</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td data-order="1284933600">Mon 20th Sep 10</td>
|
||||
<td data-order="85600">$85,600/m</td>
|
||||
<td data-order="1284937200">Mon 20th Sep 10</td>
|
||||
<td data-order="85600">$85,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Angelica Ramos">A. Ramos</td>
|
||||
<td>Chief Executive Officer (CEO)</td>
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td data-order="1255039200">Fri 9th Oct 09</td>
|
||||
<td data-order="1200000">$1,200,000/m</td>
|
||||
<td data-order="1255042800">Fri 9th Oct 09</td>
|
||||
<td data-order="1200000">$1,200,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gavin Joyce">G. Joyce</td>
|
||||
<td>Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td data-order="1292972400">Wed 22nd Dec 10</td>
|
||||
<td data-order="92575">$92,575/m</td>
|
||||
<td data-order="1292976000">Wed 22nd Dec 10</td>
|
||||
<td data-order="92575">$92,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jennifer Chang">J. Chang</td>
|
||||
<td>Regional Director</td>
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td data-order="1289689200">Sun 14th Nov 10</td>
|
||||
<td data-order="357650">$357,650/m</td>
|
||||
<td data-order="1289692800">Sun 14th Nov 10</td>
|
||||
<td data-order="357650">$357,650/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Brenden Wagner">B. Wagner</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td data-order="1307397600">Tue 7th Jun 11</td>
|
||||
<td data-order="206850">$206,850/m</td>
|
||||
<td data-order="1307401200">Tue 7th Jun 11</td>
|
||||
<td data-order="206850">$206,850/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Fiona Green">F. Green</td>
|
||||
<td>Chief Operating Officer (COO)</td>
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td data-order="1268262000">Thu 11th Mar 10</td>
|
||||
<td data-order="850000">$850,000/m</td>
|
||||
<td data-order="1268265600">Thu 11th Mar 10</td>
|
||||
<td data-order="850000">$850,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Shou Itou">S. Itou</td>
|
||||
<td>Regional Marketing</td>
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td data-order="1313272800">Sun 14th Aug 11</td>
|
||||
<td data-order="163000">$163,000/m</td>
|
||||
<td data-order="1313276400">Sun 14th Aug 11</td>
|
||||
<td data-order="163000">$163,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michelle House">M. House</td>
|
||||
<td>Integration Specialist</td>
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td data-order="1306965600">Thu 2nd Jun 11</td>
|
||||
<td data-order="95400">$95,400/m</td>
|
||||
<td data-order="1306969200">Thu 2nd Jun 11</td>
|
||||
<td data-order="95400">$95,400/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Suki Burks">S. Burks</td>
|
||||
<td>Developer</td>
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td data-order="1256162400">Thu 22nd Oct 09</td>
|
||||
<td data-order="114500">$114,500/m</td>
|
||||
<td data-order="1256166000">Thu 22nd Oct 09</td>
|
||||
<td data-order="114500">$114,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Prescott Bartlett">P. Bartlett</td>
|
||||
<td>Technical Author</td>
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td data-order="1304719200">Sat 7th May 11</td>
|
||||
<td data-order="145000">$145,000/m</td>
|
||||
<td data-order="1304722800">Sat 7th May 11</td>
|
||||
<td data-order="145000">$145,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Gavin Cortez">G. Cortez</td>
|
||||
<td>Team Leader</td>
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td data-order="1224972000">Sun 26th Oct 08</td>
|
||||
<td data-order="235500">$235,500/m</td>
|
||||
<td data-order="1224975600">Sun 26th Oct 08</td>
|
||||
<td data-order="235500">$235,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Martena Mccray">M. Mccray</td>
|
||||
<td>Post-Sales support</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td data-order="1299625200">Wed 9th Mar 11</td>
|
||||
<td data-order="324050">$324,050/m</td>
|
||||
<td data-order="1299628800">Wed 9th Mar 11</td>
|
||||
<td data-order="324050">$324,050/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Unity Butler">U. Butler</td>
|
||||
<td>Marketing Designer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td data-order="1260313200">Wed 9th Dec 09</td>
|
||||
<td data-order="85675">$85,675/m</td>
|
||||
<td data-order="1260316800">Wed 9th Dec 09</td>
|
||||
<td data-order="85675">$85,675/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Howard Hatfield">H. Hatfield</td>
|
||||
<td>Office Manager</td>
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td data-order="1229382000">Tue 16th Dec 08</td>
|
||||
<td data-order="164500">$164,500/m</td>
|
||||
<td data-order="1229385600">Tue 16th Dec 08</td>
|
||||
<td data-order="164500">$164,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Hope Fuentes">H. Fuentes</td>
|
||||
<td>Secretary</td>
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td data-order="1265929200">Fri 12th Feb 10</td>
|
||||
<td data-order="109850">$109,850/m</td>
|
||||
<td data-order="1265932800">Fri 12th Feb 10</td>
|
||||
<td data-order="109850">$109,850/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Vivian Harrell">V. Harrell</td>
|
||||
<td>Financial Controller</td>
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td data-order="1234566000">Sat 14th Feb 09</td>
|
||||
<td data-order="452500">$452,500/m</td>
|
||||
<td data-order="1234569600">Sat 14th Feb 09</td>
|
||||
<td data-order="452500">$452,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Timothy Mooney">T. Mooney</td>
|
||||
<td>Office Manager</td>
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td data-order="1228950000">Thu 11th Dec 08</td>
|
||||
<td data-order="136200">$136,200/m</td>
|
||||
<td data-order="1228953600">Thu 11th Dec 08</td>
|
||||
<td data-order="136200">$136,200/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jackson Bradshaw">J. Bradshaw</td>
|
||||
<td>Director</td>
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td data-order="1222380000">Fri 26th Sep 08</td>
|
||||
<td data-order="645750">$645,750/m</td>
|
||||
<td data-order="1222383600">Fri 26th Sep 08</td>
|
||||
<td data-order="645750">$645,750/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Olivia Liang">O. Liang</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td data-order="1296687600">Thu 3rd Feb 11</td>
|
||||
<td data-order="234500">$234,500/m</td>
|
||||
<td data-order="1296691200">Thu 3rd Feb 11</td>
|
||||
<td data-order="234500">$234,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Bruno Nash">B. Nash</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td data-order="1304373600">Tue 3rd May 11</td>
|
||||
<td data-order="163500">$163,500/m</td>
|
||||
<td data-order="1304377200">Tue 3rd May 11</td>
|
||||
<td data-order="163500">$163,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Sakura Yamamoto">S. Yamamoto</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td data-order="1250632800">Wed 19th Aug 09</td>
|
||||
<td data-order="139575">$139,575/m</td>
|
||||
<td data-order="1250636400">Wed 19th Aug 09</td>
|
||||
<td data-order="139575">$139,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Thor Walton">T. Walton</td>
|
||||
<td>Developer</td>
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td data-order="1376172000">Sun 11th Aug 13</td>
|
||||
<td data-order="98540">$98,540/m</td>
|
||||
<td data-order="1376175600">Sun 11th Aug 13</td>
|
||||
<td data-order="98540">$98,540/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Finn Camacho">F. Camacho</td>
|
||||
<td>Support Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td data-order="1246917600">Tue 7th Jul 09</td>
|
||||
<td data-order="87500">$87,500/m</td>
|
||||
<td data-order="1246921200">Tue 7th Jul 09</td>
|
||||
<td data-order="87500">$87,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Serge Baldwin">S. Baldwin</td>
|
||||
<td>Data Coordinator</td>
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td data-order="1333922400">Mon 9th Apr 12</td>
|
||||
<td data-order="138575">$138,575/m</td>
|
||||
<td data-order="1333926000">Mon 9th Apr 12</td>
|
||||
<td data-order="138575">$138,575/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Zenaida Frank">Z. Frank</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td data-order="1262559600">Mon 4th Jan 10</td>
|
||||
<td data-order="125250">$125,250/m</td>
|
||||
<td data-order="1262563200">Mon 4th Jan 10</td>
|
||||
<td data-order="125250">$125,250/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Zorita Serrano">Z. Serrano</td>
|
||||
<td>Software Engineer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td data-order="1338501600">Fri 1st Jun 12</td>
|
||||
<td data-order="115000">$115,000/m</td>
|
||||
<td data-order="1338505200">Fri 1st Jun 12</td>
|
||||
<td data-order="115000">$115,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jennifer Acosta">J. Acosta</td>
|
||||
<td>Junior Javascript Developer</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td data-order="1359673200">Fri 1st Feb 13</td>
|
||||
<td data-order="75650">$75,650/m</td>
|
||||
<td data-order="1359676800">Fri 1st Feb 13</td>
|
||||
<td data-order="75650">$75,650/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Cara Stevens">C. Stevens</td>
|
||||
<td>Sales Assistant</td>
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td data-order="1323126000">Tue 6th Dec 11</td>
|
||||
<td data-order="145600">$145,600/m</td>
|
||||
<td data-order="1323129600">Tue 6th Dec 11</td>
|
||||
<td data-order="145600">$145,600/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Hermione Butler">H. Butler</td>
|
||||
<td>Regional Director</td>
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td data-order="1300662000">Mon 21st Mar 11</td>
|
||||
<td data-order="356250">$356,250/m</td>
|
||||
<td data-order="1300665600">Mon 21st Mar 11</td>
|
||||
<td data-order="356250">$356,250/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Lael Greer">L. Greer</td>
|
||||
<td>Systems Administrator</td>
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td data-order="1235689200">Fri 27th Feb 09</td>
|
||||
<td data-order="103500">$103,500/m</td>
|
||||
<td data-order="1235692800">Fri 27th Feb 09</td>
|
||||
<td data-order="103500">$103,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Jonas Alexander">J. Alexander</td>
|
||||
<td>Developer</td>
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td data-order="1279058400">Wed 14th Jul 10</td>
|
||||
<td data-order="86500">$86,500/m</td>
|
||||
<td data-order="1279062000">Wed 14th Jul 10</td>
|
||||
<td data-order="86500">$86,500/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Shad Decker">S. Decker</td>
|
||||
<td>Regional Director</td>
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td data-order="1226530800">Thu 13th Nov 08</td>
|
||||
<td data-order="183000">$183,000/m</td>
|
||||
<td data-order="1226534400">Thu 13th Nov 08</td>
|
||||
<td data-order="183000">$183,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Michael Bruce">M. Bruce</td>
|
||||
<td>Javascript Developer</td>
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td data-order="1309125600">Mon 27th Jun 11</td>
|
||||
<td data-order="183000">$183,000/m</td>
|
||||
<td data-order="1309129200">Mon 27th Jun 11</td>
|
||||
<td data-order="183000">$183,000/y</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td data-search="Donna Snider">D. Snider</td>
|
||||
<td>Customer Support</td>
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td data-order="1295910000">Tue 25th Jan 11</td>
|
||||
<td data-order="112000">$112,000/m</td>
|
||||
<td data-order="1295913600">Tue 25th Jan 11</td>
|
||||
<td data-order="112000">$112,000/y</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -551,51 +545,44 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -618,17 +605,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -642,8 +627,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -659,14 +646,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -684,21 +672,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -729,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>
|
||||
|
||||
@@ -738,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>
|
||||
@@ -749,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
744
examples/advanced_init/html5-data-options.html
Normal file
@@ -0,0 +1,744 @@
|
||||
<!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="//code.jquery.com/jquery-1.11.3.min.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</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</code></a> and <a href="//datatables.net/reference/option/order"><code class="option" title=
|
||||
"DataTables initialisation option">order</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</code></a> option on
|
||||
the fifth column below.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" width="100%" data-page-length="25" data-order="[[ 1, "asc" ]]">
|
||||
<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="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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_y_dynamic.html">Scroll - vertical, dynamic height</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/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 with column visibility</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 Bootstrap 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/extensions">extensions</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> © 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>
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,16 +16,15 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Advanced initialisation</span></h1>
|
||||
<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>
|
||||
@@ -43,8 +43,10 @@
|
||||
<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="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
|
||||
<li><a href="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -57,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Language file</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,9 +20,9 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"language": {
|
||||
"url": "../resources/de_DE.txt"
|
||||
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json"
|
||||
}
|
||||
} );
|
||||
} );
|
||||
@@ -33,17 +34,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language file</span></h1>
|
||||
<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=
|
||||
"Initialisation option">language</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=
|
||||
"Initialisation option">language.url</code></a> option.</p>
|
||||
<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</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</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%">
|
||||
@@ -539,55 +538,48 @@ $(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( {
|
||||
"language": {
|
||||
"url": "../resources/de_DE.txt"
|
||||
"url": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/German.json"
|
||||
}
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -610,17 +602,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -634,8 +624,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -651,14 +643,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -676,21 +669,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -721,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>
|
||||
|
||||
@@ -730,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>
|
||||
@@ -741,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Page length options</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
||||
} );
|
||||
} );
|
||||
@@ -31,19 +32,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Page length options</span></h1>
|
||||
<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="Initialisation option">lengthMenu</code></a> initialisation option.</p>
|
||||
<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</code></a> initialisation option.</p>
|
||||
|
||||
<p>This parameter can take one of two forms:</p>
|
||||
|
||||
<ul>
|
||||
<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>
|
||||
@@ -542,53 +542,46 @@ $(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( {
|
||||
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +604,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -635,8 +626,10 @@ $(document).ready(function() {
|
||||
<li><a href="./column_render.html">Column rendering</a></li>
|
||||
<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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -652,14 +645,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -677,21 +671,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -722,8 +713,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>
|
||||
|
||||
@@ -731,10 +721,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>
|
||||
@@ -742,14 +730,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
771
examples/advanced_init/object_dom_read.html
Normal 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="//code.jquery.com/jquery-1.11.3.min.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</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</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({
|
||||
"columns": [
|
||||
{ "data": "name" },
|
||||
{ "data": "position" },
|
||||
{ "data": "office" },
|
||||
{ "data": "age" },
|
||||
{ "data": "start_date" },
|
||||
{ "data": "salary" }
|
||||
]
|
||||
});
|
||||
} );</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="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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_y_dynamic.html">Scroll - vertical, dynamic height</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/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 with column visibility</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 Bootstrap 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/extensions">extensions</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> © 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>
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Row created callback</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -16,7 +17,7 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -24,9 +25,9 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#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');
|
||||
}
|
||||
}
|
||||
@@ -40,20 +41,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row created callback</span></h1>
|
||||
<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=
|
||||
"Initialisation option">createdRow</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</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=
|
||||
"Initialisation option">columns.createdCell</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</code></a> could also be used to create exactly the same effect.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -549,60 +546,53 @@ $(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( {
|
||||
"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');
|
||||
}
|
||||
}
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -625,17 +615,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -649,8 +637,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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -666,14 +656,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -691,21 +682,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -736,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>
|
||||
|
||||
@@ -745,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>
|
||||
@@ -756,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Row grouping</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -16,7 +17,7 @@ tr.group:hover {
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -66,20 +67,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row grouping</span></h1>
|
||||
<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=
|
||||
"Initialisation option">drawCallback</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</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%">
|
||||
@@ -575,8 +572,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({
|
||||
"columnDefs": [
|
||||
{ "visible": false, "targets": 2 }
|
||||
@@ -612,49 +608,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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -677,17 +667,15 @@ 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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -701,8 +689,10 @@ tr.group:hover {
|
||||
<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="./html5-data-attributes.html">HTML5 data-* attributes</a></li>
|
||||
<li><a href="./complex_header.html">Complex headers with column visibility</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>
|
||||
@@ -718,14 +708,15 @@ tr.group:hover {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -743,21 +734,18 @@ tr.group:hover {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -788,8 +776,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>
|
||||
|
||||
@@ -797,10 +784,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>
|
||||
@@ -808,14 +793,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Order direction sequence control</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"aoColumns": [
|
||||
null,
|
||||
null,
|
||||
@@ -38,19 +39,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Order direction sequence control</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.orderSequence</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</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>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>Column 1 - default ordering</li>
|
||||
<li>Column 2 - default ordering</li>
|
||||
<li>Column 3 - ascending ordering only</li>
|
||||
@@ -59,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%">
|
||||
@@ -557,9 +555,8 @@ $(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( {
|
||||
"aoColumns": [
|
||||
null,
|
||||
null,
|
||||
@@ -571,46 +568,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +624,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -657,16 +646,17 @@ $(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><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="./complex_header.html">Complex headers with column visibility</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>
|
||||
|
||||
@@ -675,14 +665,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -700,21 +691,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -745,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>
|
||||
|
||||
@@ -754,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>
|
||||
@@ -765,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Flat array data source</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": {
|
||||
"url": "data/objects_root_array.txt",
|
||||
"dataSrc": ""
|
||||
@@ -40,32 +41,26 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Flat array data source</span></h1>
|
||||
<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=
|
||||
"Initialisation option">ajax</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</code></a> initiation option.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
|
||||
"Initialisation option">ajax.dataSrc</code></a> has a number of ways in which it can be used:</p>
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title="DataTables initialisation option">ajax.dataSrc</code></a> has a number
|
||||
of ways in which it can be used:</p>
|
||||
|
||||
<ul>
|
||||
<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 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>
|
||||
</ul>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
|
||||
"option" title="Initialisation option">ajax.dataSrc</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</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%">
|
||||
@@ -102,9 +97,8 @@ $(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( {
|
||||
"ajax": {
|
||||
"url": "data/objects_root_array.txt",
|
||||
"dataSrc": ""
|
||||
@@ -120,46 +114,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -182,17 +170,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -205,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 with column visibility</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 +211,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -251,21 +237,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -296,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>
|
||||
|
||||
@@ -305,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>
|
||||
@@ -316,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Custom data source property</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": {
|
||||
"url": "data/arrays_custom_prop.txt",
|
||||
"dataSrc": "demo"
|
||||
@@ -32,32 +33,28 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom data source property</span></h1>
|
||||
<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=
|
||||
"Initialisation option">ajax</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</code></a> initiation option.</p>
|
||||
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title=
|
||||
"Initialisation option">ajax.dataSrc</code></a> has a number of ways in which it can be used:</p>
|
||||
<p>The <a href="//datatables.net/reference/option/ajax.dataSrc"><code class="option" title="DataTables initialisation option">ajax.dataSrc</code></a> has a number
|
||||
of ways in which it can be used:</p>
|
||||
|
||||
<ul>
|
||||
<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 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>
|
||||
</ul>
|
||||
|
||||
<p>The example below shows <a href="//datatables.net/reference/option/ajax.dataSrc"><code class=
|
||||
"option" title="Initialisation option">ajax.dataSrc</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</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>For more details on loading a DataTable with Ajax data, please refer to the <a href="https://datatables.net/manual/ajax">Ajax section of the manual</a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -94,9 +91,8 @@ $(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( {
|
||||
"ajax": {
|
||||
"url": "data/arrays_custom_prop.txt",
|
||||
"dataSrc": "demo"
|
||||
@@ -104,46 +100,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -166,17 +156,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -189,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 with column visibility</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>
|
||||
|
||||
@@ -210,14 +197,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -235,21 +223,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -262,8 +247,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>
|
||||
@@ -281,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>
|
||||
|
||||
@@ -290,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>
|
||||
@@ -301,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"salary": "$320,800",
|
||||
"start_date": {
|
||||
"display": "Mon 25th Apr 11",
|
||||
"timestamp": "1303682400"
|
||||
"timestamp": "1303686000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "5421"
|
||||
@@ -17,7 +17,7 @@
|
||||
"salary": "$170,750",
|
||||
"start_date": {
|
||||
"display": "Mon 25th Jul 11",
|
||||
"timestamp": "1311544800"
|
||||
"timestamp": "1311548400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "8422"
|
||||
@@ -28,7 +28,7 @@
|
||||
"salary": "$86,000",
|
||||
"start_date": {
|
||||
"display": "Mon 12th Jan 09",
|
||||
"timestamp": "1231714800"
|
||||
"timestamp": "1231718400"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "1562"
|
||||
@@ -39,7 +39,7 @@
|
||||
"salary": "$433,060",
|
||||
"start_date": {
|
||||
"display": "Thu 29th Mar 12",
|
||||
"timestamp": "1332972000"
|
||||
"timestamp": "1332975600"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "6224"
|
||||
@@ -50,7 +50,7 @@
|
||||
"salary": "$162,700",
|
||||
"start_date": {
|
||||
"display": "Fri 28th Nov 08",
|
||||
"timestamp": "1227826800"
|
||||
"timestamp": "1227830400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "5407"
|
||||
@@ -61,7 +61,7 @@
|
||||
"salary": "$372,000",
|
||||
"start_date": {
|
||||
"display": "Sun 2nd Dec 12",
|
||||
"timestamp": "1354402800"
|
||||
"timestamp": "1354406400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "4804"
|
||||
@@ -72,7 +72,7 @@
|
||||
"salary": "$137,500",
|
||||
"start_date": {
|
||||
"display": "Mon 6th Aug 12",
|
||||
"timestamp": "1344204000"
|
||||
"timestamp": "1344207600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "9608"
|
||||
@@ -83,7 +83,7 @@
|
||||
"salary": "$327,900",
|
||||
"start_date": {
|
||||
"display": "Thu 14th Oct 10",
|
||||
"timestamp": "1287007200"
|
||||
"timestamp": "1287010800"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "6200"
|
||||
@@ -94,7 +94,7 @@
|
||||
"salary": "$205,500",
|
||||
"start_date": {
|
||||
"display": "Tue 15th Sep 09",
|
||||
"timestamp": "1252965600"
|
||||
"timestamp": "1252969200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2360"
|
||||
@@ -105,7 +105,7 @@
|
||||
"salary": "$103,600",
|
||||
"start_date": {
|
||||
"display": "Sat 13th Dec 08",
|
||||
"timestamp": "1229122800"
|
||||
"timestamp": "1229126400"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "1667"
|
||||
@@ -116,7 +116,7 @@
|
||||
"salary": "$90,560",
|
||||
"start_date": {
|
||||
"display": "Fri 19th Dec 08",
|
||||
"timestamp": "1229641200"
|
||||
"timestamp": "1229644800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3814"
|
||||
@@ -127,7 +127,7 @@
|
||||
"salary": "$342,000",
|
||||
"start_date": {
|
||||
"display": "Sun 3rd Mar 13",
|
||||
"timestamp": "1362265200"
|
||||
"timestamp": "1362268800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "9497"
|
||||
@@ -138,7 +138,7 @@
|
||||
"salary": "$470,600",
|
||||
"start_date": {
|
||||
"display": "Thu 16th Oct 08",
|
||||
"timestamp": "1224108000"
|
||||
"timestamp": "1224111600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "6741"
|
||||
@@ -149,7 +149,7 @@
|
||||
"salary": "$313,500",
|
||||
"start_date": {
|
||||
"display": "Tue 18th Dec 12",
|
||||
"timestamp": "1355785200"
|
||||
"timestamp": "1355788800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3597"
|
||||
@@ -160,7 +160,7 @@
|
||||
"salary": "$385,750",
|
||||
"start_date": {
|
||||
"display": "Wed 17th Mar 10",
|
||||
"timestamp": "1268780400"
|
||||
"timestamp": "1268784000"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1965"
|
||||
@@ -171,7 +171,7 @@
|
||||
"salary": "$198,500",
|
||||
"start_date": {
|
||||
"display": "Tue 27th Nov 12",
|
||||
"timestamp": "1353970800"
|
||||
"timestamp": "1353974400"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1581"
|
||||
@@ -182,7 +182,7 @@
|
||||
"salary": "$725,000",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Jun 10",
|
||||
"timestamp": "1276034400"
|
||||
"timestamp": "1276038000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "3059"
|
||||
@@ -193,7 +193,7 @@
|
||||
"salary": "$237,500",
|
||||
"start_date": {
|
||||
"display": "Fri 10th Apr 09",
|
||||
"timestamp": "1239314400"
|
||||
"timestamp": "1239318000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1721"
|
||||
@@ -204,7 +204,7 @@
|
||||
"salary": "$132,000",
|
||||
"start_date": {
|
||||
"display": "Sat 13th Oct 12",
|
||||
"timestamp": "1350079200"
|
||||
"timestamp": "1350082800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "2558"
|
||||
@@ -215,7 +215,7 @@
|
||||
"salary": "$217,500",
|
||||
"start_date": {
|
||||
"display": "Wed 26th Sep 12",
|
||||
"timestamp": "1348610400"
|
||||
"timestamp": "1348614000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "2290"
|
||||
@@ -226,7 +226,7 @@
|
||||
"salary": "$345,000",
|
||||
"start_date": {
|
||||
"display": "Sat 3rd Sep 11",
|
||||
"timestamp": "1315000800"
|
||||
"timestamp": "1315004400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1937"
|
||||
@@ -237,7 +237,7 @@
|
||||
"salary": "$675,000",
|
||||
"start_date": {
|
||||
"display": "Thu 25th Jun 09",
|
||||
"timestamp": "1245880800"
|
||||
"timestamp": "1245884400"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "6154"
|
||||
@@ -248,7 +248,7 @@
|
||||
"salary": "$106,450",
|
||||
"start_date": {
|
||||
"display": "Mon 12th Dec 11",
|
||||
"timestamp": "1323644400"
|
||||
"timestamp": "1323648000"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "8330"
|
||||
@@ -259,7 +259,7 @@
|
||||
"salary": "$85,600",
|
||||
"start_date": {
|
||||
"display": "Mon 20th Sep 10",
|
||||
"timestamp": "1284933600"
|
||||
"timestamp": "1284937200"
|
||||
},
|
||||
"office": "Sidney",
|
||||
"extn": "3023"
|
||||
@@ -270,7 +270,7 @@
|
||||
"salary": "$1,200,000",
|
||||
"start_date": {
|
||||
"display": "Fri 9th Oct 09",
|
||||
"timestamp": "1255039200"
|
||||
"timestamp": "1255042800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "5797"
|
||||
@@ -281,7 +281,7 @@
|
||||
"salary": "$92,575",
|
||||
"start_date": {
|
||||
"display": "Wed 22nd Dec 10",
|
||||
"timestamp": "1292972400"
|
||||
"timestamp": "1292976000"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "8822"
|
||||
@@ -292,7 +292,7 @@
|
||||
"salary": "$357,650",
|
||||
"start_date": {
|
||||
"display": "Sun 14th Nov 10",
|
||||
"timestamp": "1289689200"
|
||||
"timestamp": "1289692800"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "9239"
|
||||
@@ -303,7 +303,7 @@
|
||||
"salary": "$206,850",
|
||||
"start_date": {
|
||||
"display": "Tue 7th Jun 11",
|
||||
"timestamp": "1307397600"
|
||||
"timestamp": "1307401200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "1314"
|
||||
@@ -314,7 +314,7 @@
|
||||
"salary": "$850,000",
|
||||
"start_date": {
|
||||
"display": "Thu 11th Mar 10",
|
||||
"timestamp": "1268262000"
|
||||
"timestamp": "1268265600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2947"
|
||||
@@ -325,7 +325,7 @@
|
||||
"salary": "$163,000",
|
||||
"start_date": {
|
||||
"display": "Sun 14th Aug 11",
|
||||
"timestamp": "1313272800"
|
||||
"timestamp": "1313276400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "8899"
|
||||
@@ -336,7 +336,7 @@
|
||||
"salary": "$95,400",
|
||||
"start_date": {
|
||||
"display": "Thu 2nd Jun 11",
|
||||
"timestamp": "1306965600"
|
||||
"timestamp": "1306969200"
|
||||
},
|
||||
"office": "Sidney",
|
||||
"extn": "2769"
|
||||
@@ -347,7 +347,7 @@
|
||||
"salary": "$114,500",
|
||||
"start_date": {
|
||||
"display": "Thu 22nd Oct 09",
|
||||
"timestamp": "1256162400"
|
||||
"timestamp": "1256166000"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6832"
|
||||
@@ -358,7 +358,7 @@
|
||||
"salary": "$145,000",
|
||||
"start_date": {
|
||||
"display": "Sat 7th May 11",
|
||||
"timestamp": "1304719200"
|
||||
"timestamp": "1304722800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "3606"
|
||||
@@ -369,7 +369,7 @@
|
||||
"salary": "$235,500",
|
||||
"start_date": {
|
||||
"display": "Sun 26th Oct 08",
|
||||
"timestamp": "1224972000"
|
||||
"timestamp": "1224975600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2860"
|
||||
@@ -380,7 +380,7 @@
|
||||
"salary": "$324,050",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Mar 11",
|
||||
"timestamp": "1299625200"
|
||||
"timestamp": "1299628800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "8240"
|
||||
@@ -391,7 +391,7 @@
|
||||
"salary": "$85,675",
|
||||
"start_date": {
|
||||
"display": "Wed 9th Dec 09",
|
||||
"timestamp": "1260313200"
|
||||
"timestamp": "1260316800"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "5384"
|
||||
@@ -402,7 +402,7 @@
|
||||
"salary": "$164,500",
|
||||
"start_date": {
|
||||
"display": "Tue 16th Dec 08",
|
||||
"timestamp": "1229382000"
|
||||
"timestamp": "1229385600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "7031"
|
||||
@@ -413,7 +413,7 @@
|
||||
"salary": "$109,850",
|
||||
"start_date": {
|
||||
"display": "Fri 12th Feb 10",
|
||||
"timestamp": "1265929200"
|
||||
"timestamp": "1265932800"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "6318"
|
||||
@@ -424,7 +424,7 @@
|
||||
"salary": "$452,500",
|
||||
"start_date": {
|
||||
"display": "Sat 14th Feb 09",
|
||||
"timestamp": "1234566000"
|
||||
"timestamp": "1234569600"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "9422"
|
||||
@@ -435,7 +435,7 @@
|
||||
"salary": "$136,200",
|
||||
"start_date": {
|
||||
"display": "Thu 11th Dec 08",
|
||||
"timestamp": "1228950000"
|
||||
"timestamp": "1228953600"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "7580"
|
||||
@@ -446,7 +446,7 @@
|
||||
"salary": "$645,750",
|
||||
"start_date": {
|
||||
"display": "Fri 26th Sep 08",
|
||||
"timestamp": "1222380000"
|
||||
"timestamp": "1222383600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "1042"
|
||||
@@ -457,7 +457,7 @@
|
||||
"salary": "$234,500",
|
||||
"start_date": {
|
||||
"display": "Thu 3rd Feb 11",
|
||||
"timestamp": "1296687600"
|
||||
"timestamp": "1296691200"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "2120"
|
||||
@@ -468,7 +468,7 @@
|
||||
"salary": "$163,500",
|
||||
"start_date": {
|
||||
"display": "Tue 3rd May 11",
|
||||
"timestamp": "1304373600"
|
||||
"timestamp": "1304377200"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6222"
|
||||
@@ -479,7 +479,7 @@
|
||||
"salary": "$139,575",
|
||||
"start_date": {
|
||||
"display": "Wed 19th Aug 09",
|
||||
"timestamp": "1250632800"
|
||||
"timestamp": "1250636400"
|
||||
},
|
||||
"office": "Tokyo",
|
||||
"extn": "9383"
|
||||
@@ -490,7 +490,7 @@
|
||||
"salary": "$98,540",
|
||||
"start_date": {
|
||||
"display": "Sun 11th Aug 13",
|
||||
"timestamp": "1376172000"
|
||||
"timestamp": "1376175600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "8327"
|
||||
@@ -501,7 +501,7 @@
|
||||
"salary": "$87,500",
|
||||
"start_date": {
|
||||
"display": "Tue 7th Jul 09",
|
||||
"timestamp": "1246917600"
|
||||
"timestamp": "1246921200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "2927"
|
||||
@@ -512,7 +512,7 @@
|
||||
"salary": "$138,575",
|
||||
"start_date": {
|
||||
"display": "Mon 9th Apr 12",
|
||||
"timestamp": "1333922400"
|
||||
"timestamp": "1333926000"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "8352"
|
||||
@@ -523,7 +523,7 @@
|
||||
"salary": "$125,250",
|
||||
"start_date": {
|
||||
"display": "Mon 4th Jan 10",
|
||||
"timestamp": "1262559600"
|
||||
"timestamp": "1262563200"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "7439"
|
||||
@@ -534,7 +534,7 @@
|
||||
"salary": "$115,000",
|
||||
"start_date": {
|
||||
"display": "Fri 1st Jun 12",
|
||||
"timestamp": "1338501600"
|
||||
"timestamp": "1338505200"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "4389"
|
||||
@@ -545,7 +545,7 @@
|
||||
"salary": "$75,650",
|
||||
"start_date": {
|
||||
"display": "Fri 1st Feb 13",
|
||||
"timestamp": "1359673200"
|
||||
"timestamp": "1359676800"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "3431"
|
||||
@@ -556,7 +556,7 @@
|
||||
"salary": "$145,600",
|
||||
"start_date": {
|
||||
"display": "Tue 6th Dec 11",
|
||||
"timestamp": "1323126000"
|
||||
"timestamp": "1323129600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "3990"
|
||||
@@ -567,7 +567,7 @@
|
||||
"salary": "$356,250",
|
||||
"start_date": {
|
||||
"display": "Mon 21st Mar 11",
|
||||
"timestamp": "1300662000"
|
||||
"timestamp": "1300665600"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "1016"
|
||||
@@ -578,7 +578,7 @@
|
||||
"salary": "$103,500",
|
||||
"start_date": {
|
||||
"display": "Fri 27th Feb 09",
|
||||
"timestamp": "1235689200"
|
||||
"timestamp": "1235692800"
|
||||
},
|
||||
"office": "London",
|
||||
"extn": "6733"
|
||||
@@ -589,7 +589,7 @@
|
||||
"salary": "$86,500",
|
||||
"start_date": {
|
||||
"display": "Wed 14th Jul 10",
|
||||
"timestamp": "1279058400"
|
||||
"timestamp": "1279062000"
|
||||
},
|
||||
"office": "San Francisco",
|
||||
"extn": "8196"
|
||||
@@ -600,7 +600,7 @@
|
||||
"salary": "$183,000",
|
||||
"start_date": {
|
||||
"display": "Thu 13th Nov 08",
|
||||
"timestamp": "1226530800"
|
||||
"timestamp": "1226534400"
|
||||
},
|
||||
"office": "Edinburgh",
|
||||
"extn": "6373"
|
||||
@@ -611,7 +611,7 @@
|
||||
"salary": "$183,000",
|
||||
"start_date": {
|
||||
"display": "Mon 27th Jun 11",
|
||||
"timestamp": "1309125600"
|
||||
"timestamp": "1309129200"
|
||||
},
|
||||
"office": "Singapore",
|
||||
"extn": "5384"
|
||||
@@ -622,7 +622,7 @@
|
||||
"salary": "$112,000",
|
||||
"start_date": {
|
||||
"display": "Tue 25th Jan 11",
|
||||
"timestamp": "1295910000"
|
||||
"timestamp": "1295913600"
|
||||
},
|
||||
"office": "New York",
|
||||
"extn": "4226"
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Nested object data (objects)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"processing": true,
|
||||
"ajax": "data/objects_deep.txt",
|
||||
"columns": [
|
||||
@@ -38,24 +39,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Nested object data (objects)</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.data</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=
|
||||
"Initialisation option">columns.data</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</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</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",
|
||||
@@ -107,9 +104,8 @@ $(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( {
|
||||
"processing": true,
|
||||
"ajax": "data/objects_deep.txt",
|
||||
"columns": [
|
||||
@@ -123,46 +119,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -185,17 +175,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -208,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 with column visibility</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 +216,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -254,21 +242,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -299,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>
|
||||
|
||||
@@ -308,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>
|
||||
@@ -319,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Deferred rendering for speed</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": "data/arrays.txt",
|
||||
"deferRender": true
|
||||
} );
|
||||
@@ -30,24 +31,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Deferred rendering for speed</span></h1>
|
||||
<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=
|
||||
"Initialisation option">deferRender</code></a> option.</p>
|
||||
<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</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%">
|
||||
@@ -84,54 +81,47 @@ $(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( {
|
||||
"ajax": "data/arrays.txt",
|
||||
"deferRender": 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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -154,17 +144,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -177,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 with column visibility</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>
|
||||
|
||||
@@ -198,14 +185,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -223,21 +211,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -268,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>
|
||||
|
||||
@@ -277,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>
|
||||
@@ -288,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,17 +16,14 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax sourced data</span></h1>
|
||||
<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=
|
||||
"Initialisation option">ajax</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</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>
|
||||
@@ -53,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Generated content for a column</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -39,35 +40,27 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Generated content for a column</span></h1>
|
||||
<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>
|
||||
<li><a href="//datatables.net/reference/option/columns.render"><code class="option" title=
|
||||
"Initialisation option">columns.render</code></a> for content that is dynamic (i.e. based upon the
|
||||
row's data)</li>
|
||||
<ul class="markdown">
|
||||
<li><a href="//datatables.net/reference/option/columns.render"><code class="option" title="DataTables initialisation option">columns.render</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=
|
||||
"Initialisation option">columns.defaultContent</code></a> for static content (i.e. simple
|
||||
strings)</li>
|
||||
"DataTables initialisation option">columns.defaultContent</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=
|
||||
"Initialisation option">columns.defaultContent</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=
|
||||
"API method">row().data()</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</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()</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="Initialisation option">columns.data</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</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%">
|
||||
@@ -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() {
|
||||
var table = $('#example').DataTable( {
|
||||
"ajax": "data/arrays.txt",
|
||||
"columnDefs": [ {
|
||||
@@ -121,46 +113,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -183,17 +169,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -206,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 with column visibility</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>
|
||||
|
||||
@@ -227,14 +210,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -252,21 +236,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -278,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>
|
||||
@@ -298,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>
|
||||
|
||||
@@ -307,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>
|
||||
@@ -318,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Ajax data source (objects)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": "data/objects.txt",
|
||||
"columns": [
|
||||
{ "data": "name" },
|
||||
@@ -37,22 +38,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax data source (objects)</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.data</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</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",
|
||||
@@ -64,6 +62,8 @@ $(document).ready(function() {
|
||||
}
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<p>For more details on loading a DataTable with Ajax data, please refer to the <a href="https://datatables.net/manual/ajax">Ajax section of the manual</a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -100,9 +100,8 @@ $(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( {
|
||||
"ajax": "data/objects.txt",
|
||||
"columns": [
|
||||
{ "data": "name" },
|
||||
@@ -115,46 +114,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -177,17 +170,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -200,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 with column visibility</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>
|
||||
|
||||
@@ -221,14 +211,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -246,21 +237,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -291,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>
|
||||
|
||||
@@ -300,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>
|
||||
@@ -311,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Nested object data (arrays)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": "data/objects_subarrays.txt",
|
||||
"columns": [
|
||||
{ "data": "name[, ]" },
|
||||
@@ -37,37 +38,29 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Nested object data (arrays)</span></h1>
|
||||
<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="Initialisation option">columns.data</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</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=
|
||||
"Initialisation option">columns.data</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=
|
||||
"Initialisation option">columns.data</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=
|
||||
"Initialisation option">columns.data</code></a> as a function).</p>
|
||||
<p>The <a href="//datatables.net/reference/option/columns.data"><code class="option" title="DataTables initialisation option">columns.data</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</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</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=
|
||||
"Initialisation option">columns.data</code></a> to read arrays:</p>
|
||||
<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</code></a> to read arrays:</p>
|
||||
|
||||
<ul>
|
||||
<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 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>
|
||||
</ul>
|
||||
<pre>
|
||||
<code class="multiline">{
|
||||
@@ -121,9 +114,8 @@ $(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( {
|
||||
"ajax": "data/objects_subarrays.txt",
|
||||
"columns": [
|
||||
{ "data": "name[, ]" },
|
||||
@@ -136,46 +128,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -198,17 +184,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -221,19 +205,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 with column visibility</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 +225,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -267,21 +251,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -312,8 +293,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>
|
||||
|
||||
@@ -321,10 +301,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>
|
||||
@@ -332,14 +310,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Orthogonal data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
ajax: "data/orthogonal.txt",
|
||||
columns: [
|
||||
{ data: "name" },
|
||||
@@ -40,22 +41,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Orthogonal data</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.data</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</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",
|
||||
@@ -106,9 +104,8 @@ $(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( {
|
||||
ajax: "data/orthogonal.txt",
|
||||
columns: [
|
||||
{ data: "name" },
|
||||
@@ -124,46 +121,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -186,17 +177,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -209,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 with column visibility</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>
|
||||
|
||||
@@ -230,14 +218,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -255,21 +244,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -300,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>
|
||||
|
||||
@@ -309,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>
|
||||
@@ -320,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Ajax data source (arrays)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": "data/arrays.txt"
|
||||
} );
|
||||
} );
|
||||
@@ -29,29 +30,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax data source (arrays)</span></h1>
|
||||
<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=
|
||||
"Initialisation option">ajax</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</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=
|
||||
"Initialisation option">ajax</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=
|
||||
"Initialisation option">ajax</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</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</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=
|
||||
"Initialisation option">columns.data</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</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",
|
||||
@@ -63,6 +58,8 @@ $(document).ready(function() {
|
||||
]
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<p>For more details on loading a DataTable with Ajax data, please refer to the <a href="https://datatables.net/manual/ajax">Ajax section of the manual</a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -99,53 +96,46 @@ $(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( {
|
||||
"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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -168,17 +158,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -191,19 +179,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 with column visibility</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>
|
||||
|
||||
@@ -212,14 +199,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -237,21 +225,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -282,8 +267,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>
|
||||
|
||||
@@ -291,10 +275,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>
|
||||
@@ -302,14 +284,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Add rows</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -45,21 +46,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Add rows</span></h1>
|
||||
<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="API method">row.add()</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="API method">rows.add()</code></a>
|
||||
method (note the plural).</p>
|
||||
<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()</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()</code></a>
|
||||
method (note the plural). Data can be likewise be updated with the <a href="//datatables.net/reference/api/row().data()"><code class="api" title=
|
||||
"DataTables API method">row().data()</code></a> and <a href="//datatables.net/reference/api/row().remove()"><code class="api" title=
|
||||
"DataTables API method">row().remove()</code></a> methods.</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="API method">draw()</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()</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>
|
||||
|
||||
<p>The <a href="https://editor.datatables.net/">Editor extension</a> adds full table editing controls, including creating, editing and deleting rows, to a
|
||||
DataTable.</p>
|
||||
</div><button id="addRow">Add new row</button>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -94,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 t = $('#example').DataTable();
|
||||
var counter = 1;
|
||||
|
||||
@@ -115,46 +117,40 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -177,17 +173,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -200,19 +194,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 with column visibility</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>
|
||||
|
||||
@@ -221,14 +214,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -246,9 +240,8 @@ $(document).ready(function() {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li class="active"><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -257,8 +250,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -289,8 +282,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>
|
||||
|
||||
@@ -298,10 +290,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>
|
||||
@@ -309,14 +299,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Using API in callbacks</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"initComplete": function () {
|
||||
var api = this.api();
|
||||
api.$('td').click( function () {
|
||||
@@ -36,28 +37,22 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Using API in callbacks</span></h1>
|
||||
<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=
|
||||
"Initialisation option">initComplete</code></a>, <a href=
|
||||
"//datatables.net/reference/option/rowCallback"><code class="option" title=
|
||||
"Initialisation option">rowCallback</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</code></a>, <a href=
|
||||
"//datatables.net/reference/option/rowCallback"><code class="option" title="DataTables initialisation option">rowCallback</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="API method">$()</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">$()</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%">
|
||||
@@ -553,9 +548,8 @@ $(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( {
|
||||
"initComplete": function () {
|
||||
var api = this.api();
|
||||
api.$('td').click( function () {
|
||||
@@ -565,46 +559,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -627,17 +615,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -650,19 +636,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 with column visibility</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>
|
||||
|
||||
@@ -671,14 +656,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -696,9 +682,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -707,8 +692,8 @@ $(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 class="active"><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -739,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>
|
||||
|
||||
@@ -748,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>
|
||||
@@ -759,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Index column</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -42,25 +43,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Index column</span></h1>
|
||||
<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="Event">order</code></a> and
|
||||
<a href="//datatables.net/reference/event/search"><code class="event" title="Event">search</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=
|
||||
"API method">column().nodes()</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=
|
||||
"API method">column()</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</code></a> and <a href=
|
||||
"//datatables.net/reference/event/search"><code class="event" title="DataTables event">search</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()</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()</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%">
|
||||
@@ -556,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 t = $('#example').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"searchable": false,
|
||||
@@ -574,46 +568,40 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +624,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -659,19 +645,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 with column visibility</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>
|
||||
|
||||
@@ -680,14 +665,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -705,9 +691,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -716,8 +701,8 @@ $(document).ready(function() {
|
||||
<li class="active"><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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -748,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>
|
||||
|
||||
@@ -757,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>
|
||||
@@ -768,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Form inputs</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -38,23 +39,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Form inputs</span></h1>
|
||||
<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=
|
||||
"API method">$()</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="API method">$()</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">$()</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">$()</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%">
|
||||
@@ -132,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
|
||||
@@ -159,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
|
||||
@@ -212,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
|
||||
@@ -265,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
|
||||
@@ -292,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
|
||||
@@ -319,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
|
||||
@@ -398,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
|
||||
@@ -425,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
|
||||
@@ -452,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
|
||||
@@ -479,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
|
||||
@@ -506,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
|
||||
@@ -533,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
|
||||
@@ -560,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
|
||||
@@ -613,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
|
||||
@@ -640,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
|
||||
@@ -667,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
|
||||
@@ -694,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
|
||||
@@ -721,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
|
||||
@@ -774,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
|
||||
@@ -801,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
|
||||
@@ -828,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
|
||||
@@ -855,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
|
||||
@@ -882,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
|
||||
@@ -935,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
|
||||
@@ -988,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
|
||||
@@ -1015,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
|
||||
@@ -1094,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
|
||||
@@ -1173,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
|
||||
@@ -1200,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
|
||||
@@ -1227,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
|
||||
@@ -1280,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
|
||||
@@ -1307,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
|
||||
@@ -1334,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
|
||||
@@ -1361,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
|
||||
@@ -1388,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
|
||||
@@ -1415,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
|
||||
@@ -1442,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
|
||||
@@ -1469,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
|
||||
@@ -1522,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
|
||||
@@ -1549,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
|
||||
@@ -1576,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
|
||||
@@ -1613,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() {
|
||||
@@ -1627,46 +1582,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -1689,17 +1638,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -1712,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 with column visibility</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>
|
||||
|
||||
@@ -1733,14 +1679,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -1758,9 +1705,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -1769,8 +1715,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1801,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>
|
||||
|
||||
@@ -1810,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>
|
||||
@@ -1821,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Highlighting rows and columns</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -17,7 +18,7 @@ td.highlight {
|
||||
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -49,21 +50,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Highlighting rows and columns</span></h1>
|
||||
<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=
|
||||
"API method">cell().index()</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=
|
||||
"API method">cells().nodes()</code></a> and <a href=
|
||||
"//datatables.net/reference/api/column().nodes()"><code class="api" title=
|
||||
"API method">column().nodes()</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()</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()</code></a> and <a href=
|
||||
"//datatables.net/reference/api/column().nodes()"><code class="api" title="DataTables API method">column().nodes()</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%">
|
||||
@@ -559,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();
|
||||
|
||||
@@ -578,48 +574,42 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -642,17 +632,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -665,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 with column visibility</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>
|
||||
|
||||
@@ -686,14 +673,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -711,9 +699,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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 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>
|
||||
@@ -722,8 +709,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -754,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>
|
||||
|
||||
@@ -763,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>
|
||||
@@ -774,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,12 +16,11 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- API</span></h1>
|
||||
<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>
|
||||
@@ -35,9 +35,8 @@
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -46,21 +45,18 @@
|
||||
<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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,22 @@
|
||||
<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 - Individual column filtering (text inputs)</title>
|
||||
<title>DataTables example - Individual column searching (text inputs)</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">
|
||||
|
||||
tfoot input {
|
||||
width: 100%;
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -27,13 +34,18 @@ $(document).ready(function() {
|
||||
|
||||
// DataTable
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
// Apply the filter
|
||||
$("#example tfoot input").on( 'keyup change', function () {
|
||||
table
|
||||
.column( $(this).parent().index()+':visible' )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
|
||||
// Apply the search
|
||||
table.columns().every( function () {
|
||||
var that = this;
|
||||
|
||||
$( 'input', this.footer() ).on( 'keyup change', function () {
|
||||
if ( that.search() !== this.value ) {
|
||||
that
|
||||
.search( this.value )
|
||||
.draw();
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -44,30 +56,23 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Individual column filtering (text inputs)</span></h1>
|
||||
<h1>DataTables example <span>Individual column searching (text inputs)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>The filtering 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
|
||||
filter 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 filtering to a specific column through the <a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</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="API method">filter()</code></a> is
|
||||
used to apply a filter to a data 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()</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()</code></a> is used to apply a filter to a result set).</p>
|
||||
|
||||
<p>The column filters are cumulative, so you can apply multiple individual column filters, in addition
|
||||
to the global filter, allowing complex filtering 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=
|
||||
"API method">column().search()</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=
|
||||
"API method">column()</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()</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()</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%">
|
||||
@@ -563,8 +568,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();
|
||||
@@ -573,56 +577,59 @@ $(document).ready(function() {
|
||||
|
||||
// DataTable
|
||||
var table = $('#example').DataTable();
|
||||
|
||||
// Apply the filter
|
||||
$("#example tfoot input").on( 'keyup change', function () {
|
||||
table
|
||||
.column( $(this).parent().index()+':visible' )
|
||||
.search( this.value )
|
||||
.draw();
|
||||
|
||||
// Apply the search
|
||||
table.columns().every( function () {
|
||||
var that = this;
|
||||
|
||||
$( 'input', this.footer() ).on( 'keyup change', function () {
|
||||
if ( that.search() !== this.value ) {
|
||||
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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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">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>
|
||||
@@ -645,17 +652,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -668,19 +673,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 with column visibility</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>
|
||||
|
||||
@@ -689,14 +693,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -714,10 +719,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 filtering (text
|
||||
inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (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>
|
||||
@@ -726,8 +729,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -758,8 +761,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>
|
||||
|
||||
@@ -767,10 +769,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>
|
||||
@@ -778,14 +778,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
<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 - Individual column filtering (select inputs)</title>
|
||||
<title>DataTables example - Individual column searching (select inputs)</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="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -19,20 +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 () {
|
||||
table.column( i )
|
||||
.search( $(this).val() )
|
||||
.draw();
|
||||
column
|
||||
.search( 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>' )
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -43,24 +51,32 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Individual column filtering (select inputs)</span></h1>
|
||||
<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=
|
||||
"API method">column().data()</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=
|
||||
"API method">unique()</code></a> and <a href="//datatables.net/reference/api/sort()"><code class="api"
|
||||
title="API method">sort()</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=
|
||||
"API method">column().search()</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()</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()</code></a> and <a href=
|
||||
"//datatables.net/reference/api/sort()"><code class="api" title="DataTables API method">sort()</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()</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()</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()</code></a>, <a href="//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"DataTables API method">column().search()</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()</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</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</code></a> is useful to execute code
|
||||
after the data has been loaded.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -556,65 +572,65 @@ $(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 = $('<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 () {
|
||||
table.column( i )
|
||||
.search( $(this).val() )
|
||||
.draw();
|
||||
column
|
||||
.search( 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>' )
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -637,17 +653,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -660,19 +674,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 with column visibility</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 +694,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -706,9 +720,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li class="active"><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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><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>
|
||||
@@ -717,8 +730,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -749,8 +762,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>
|
||||
|
||||
@@ -758,10 +770,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>
|
||||
@@ -769,14 +779,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,15 +3,16 @@
|
||||
<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 - Filtering API (regular expressions)</title>
|
||||
<title>DataTables example - Search API (regular expressions)</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="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -35,7 +36,7 @@ function filterColumn ( i ) {
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
|
||||
$('input.global_filter').on( 'keyup click', function () {
|
||||
filterGlobal();
|
||||
@@ -53,87 +54,76 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Filtering API (regular expressions)</span></h1>
|
||||
<h1>DataTables example <span>Search API (regular expressions)</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>Filtering 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 filter (<a href="//datatables.net/reference/api/search()"><code class="api" title=
|
||||
"API method">search()</code></a>) and for each individual column (<a href=
|
||||
"//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"API method">column().search()</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()</code></a>) and for each individual column (<a href="//datatables.net/reference/api/column().search()"><code class="api" title=
|
||||
"DataTables API method">column().search()</code></a>).</p>
|
||||
|
||||
<p>Note also that you must call the <a href="//datatables.net/reference/api/draw()"><code class="api"
|
||||
title="API method">draw()</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()</code></a> method after
|
||||
performing the search, in order for the results to be displayed.</p>
|
||||
|
||||
<p>Each filter (global or column) can be marked as a regular expression (allowing you to create very
|
||||
complex interactions) and as a smart filter or not. When smart filtering is enabled on a particular
|
||||
filter, DataTables will modify the user input string to a complex regular expression which can make
|
||||
filtering 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 filtering options that DataTables provides.</p>
|
||||
<p>This example allows you to "play" with the various searching options that DataTables provides.</p>
|
||||
</div>
|
||||
|
||||
<table cellpadding="3" cellspacing="0" border="0" style="width: 67%; margin: 0 auto 2em auto;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Target</th>
|
||||
<th>Filter text</th>
|
||||
<th>Search text</th>
|
||||
<th>Treat as regex</th>
|
||||
<th>Use smart filter</th>
|
||||
<th>Use smart search</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr id="filter_global">
|
||||
<td>Global filtering</td>
|
||||
<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>
|
||||
@@ -631,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'),
|
||||
@@ -649,7 +638,7 @@ function filterColumn ( i ) {
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
|
||||
$('input.global_filter').on( 'keyup click', function () {
|
||||
filterGlobal();
|
||||
@@ -660,46 +649,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -722,17 +705,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -745,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 with column visibility</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>
|
||||
|
||||
@@ -766,14 +746,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -791,9 +772,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -802,8 +782,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li class="active"><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li class="active"><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -834,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>
|
||||
|
||||
@@ -843,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>
|
||||
@@ -854,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Child rows (show extra / detailed information)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -14,12 +15,12 @@ td.details-control {
|
||||
background: url('../resources/details_open.png') no-repeat center center;
|
||||
cursor: pointer;
|
||||
}
|
||||
tr.details td.details-control {
|
||||
tr.shown td.details-control {
|
||||
background: url('../resources/details_close.png') no-repeat center center;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
@@ -50,7 +51,7 @@ $(document).ready(function() {
|
||||
"ajax": "../ajax/data/objects.txt",
|
||||
"columns": [
|
||||
{
|
||||
"class": 'details-control',
|
||||
"className": 'details-control',
|
||||
"orderable": false,
|
||||
"data": null,
|
||||
"defaultContent": ''
|
||||
@@ -65,7 +66,7 @@ $(document).ready(function() {
|
||||
|
||||
// Add event listener for opening and closing details
|
||||
$('#example tbody').on('click', 'td.details-control', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = table.row( tr );
|
||||
|
||||
if ( row.child.isShown() ) {
|
||||
@@ -88,22 +89,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Child rows (show extra / detailed information)</span></h1>
|
||||
<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="API method">row().child</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=
|
||||
"API method">row().child.hide()</code></a>), otherwise show it (<a href=
|
||||
"//datatables.net/reference/api/row().child.show()"><code class="api" title=
|
||||
"API method">row().child.show()</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</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()</code></a>), otherwise show it (<a href="//datatables.net/reference/api/row().child.show()"><code class="api" title=
|
||||
"DataTables API method">row().child.show()</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%">
|
||||
@@ -138,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 '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">'+
|
||||
@@ -163,7 +159,7 @@ $(document).ready(function() {
|
||||
"ajax": "../ajax/data/objects.txt",
|
||||
"columns": [
|
||||
{
|
||||
"class": 'details-control',
|
||||
"className": 'details-control',
|
||||
"orderable": false,
|
||||
"data": null,
|
||||
"defaultContent": ''
|
||||
@@ -178,7 +174,7 @@ $(document).ready(function() {
|
||||
|
||||
// Add event listener for opening and closing details
|
||||
$('#example tbody').on('click', 'td.details-control', function () {
|
||||
var tr = $(this).parents('tr');
|
||||
var tr = $(this).closest('tr');
|
||||
var row = table.row( tr );
|
||||
|
||||
if ( row.child.isShown() ) {
|
||||
@@ -194,52 +190,46 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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;
|
||||
}
|
||||
tr.details td.details-control {
|
||||
tr.shown td.details-control {
|
||||
background: url('../resources/details_close.png') no-repeat center center;
|
||||
}</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>
|
||||
@@ -262,17 +252,15 @@ tr.details 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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -285,19 +273,18 @@ tr.details 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 with column visibility</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>
|
||||
|
||||
@@ -306,14 +293,15 @@ tr.details td.details-control {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -331,20 +319,18 @@ tr.details td.details-control {
|
||||
<h3><a href="./index.html">API</a></h3>
|
||||
<ul class="toc active">
|
||||
<li><a href="./add_row.html">Add rows</a></li>
|
||||
<li><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
<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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -375,8 +361,7 @@ tr.details 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>
|
||||
|
||||
@@ -384,10 +369,8 @@ tr.details 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>
|
||||
@@ -395,14 +378,11 @@ tr.details 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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Row selection (multiple rows)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -37,19 +38,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row selection (multiple rows)</span></h1>
|
||||
<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=
|
||||
"API method">rows().data()</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()</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 and easier to use row selection option, check out the <a href="https://datatables.net/extras/select">Select extension</a>
|
||||
provides an API that is fully integrated with DataTables 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%">
|
||||
@@ -545,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 () {
|
||||
@@ -558,46 +555,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -620,17 +611,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -643,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 with column visibility</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>
|
||||
|
||||
@@ -664,14 +652,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -689,9 +678,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -700,8 +688,8 @@ $(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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -732,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>
|
||||
|
||||
@@ -741,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>
|
||||
@@ -752,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Row selection and deletion (single row)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -43,23 +44,20 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Row selection and deletion (single row)</span></h1>
|
||||
<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=
|
||||
"API method">row().remove()</code></a> method which will delete a row from a table, and the <a href=
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title="API method">draw()</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>Also shown is the <a href="//datatables.net/reference/api/row().remove()"><code class="api" title="DataTables API method">row().remove()</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()</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 and easier to use row selection option, check out the <a href="https://datatables.net/extras/select">Select extension</a>
|
||||
provides an API that is fully integrated with DataTables 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%">
|
||||
@@ -555,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 () {
|
||||
@@ -574,46 +571,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +627,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -659,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 with column visibility</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>
|
||||
|
||||
@@ -680,14 +668,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -705,20 +694,18 @@ $(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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
<li><a href="./api_in_init.html">Using API in callbacks</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -749,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>
|
||||
|
||||
@@ -758,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>
|
||||
@@ -769,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Show / hide columns dynamically</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -42,31 +43,25 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Show / hide columns dynamically</span></h1>
|
||||
<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=
|
||||
"API method">column().visible()</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()</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="API method">columns()</code></a>
|
||||
method to select multiple columns and then using the <a href=
|
||||
"//datatables.net/reference/api/columns().visible()"><code class="api" title=
|
||||
"API method">columns().visible()</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()</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()</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, check out the <a href="https://datatables.net/extras/buttons">Buttons extension
|
||||
for DataTables</a> provides a comprehensive module for column visibility control.</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%">
|
||||
@@ -562,8 +557,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( {
|
||||
"scrollY": "200px",
|
||||
"paging": false
|
||||
@@ -580,46 +574,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +630,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -665,19 +651,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 with column visibility</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>
|
||||
|
||||
@@ -686,14 +671,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -711,9 +697,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -722,8 +707,8 @@ $(document).ready(function() {
|
||||
<li><a href="./counter_columns.html">Index column</a></li>
|
||||
<li class="active"><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><a href="./tabs_and_scrolling.html">Scrolling and jQuery UI tabs</a></li>
|
||||
<li><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -754,8 +739,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,10 +747,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>
|
||||
@@ -774,14 +756,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,548 +3,104 @@
|
||||
<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 - 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=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">
|
||||
<title>DataTables example - Scrolling and Bootstrap tabs</title>
|
||||
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/dataTables.bootstrap.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/jquery-1.11.3.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/dataTables.bootstrap.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() {
|
||||
$("#tabs").tabs( {
|
||||
"activate": function(event, ui) {
|
||||
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
|
||||
}
|
||||
$('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) {
|
||||
$.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
|
||||
} );
|
||||
|
||||
$('table.display').dataTable( {
|
||||
"scrollY": "200px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"jQueryUI": true
|
||||
$('table.table').DataTable( {
|
||||
ajax: '../ajax/data/arrays.txt',
|
||||
scrollY: 200,
|
||||
scrollCollapse: true,
|
||||
paging: false
|
||||
} );
|
||||
|
||||
// Apply a search to the second table for the demo
|
||||
$('#myTable2').DataTable().search( 'New York' ).draw();
|
||||
} );
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="dt-example">
|
||||
<body class="dt-example dt-example-bootstrap">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scrolling and jQuery UI tabs</span></h1>
|
||||
<h1>DataTables example <span>Scrolling and Bootstrap 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 <a href="http://getbootstrap.com/javascript/#tabs">Bootstrap tabs</a> (or indeed any
|
||||
other method whereby the table is in a hidden, <code>display:none</code>, element when it is initialised).</p>
|
||||
|
||||
<p>This misalignment can be corrected by the <a href=
|
||||
"//datatables.net/reference/api/columns.adjust()"><code class="api" title=
|
||||
"API method">columns.adjust()</code></a> method when the table is made visible (i.e. it has
|
||||
dimensions).</p>
|
||||
<p>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 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="API method">columns.adjust()</code></a>.</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()</code></a> method when the table is made visible (i.e. it has dimensions).</p>
|
||||
|
||||
<p>This example shows how the Bootstrap <code>shown.bs.tab</code> event can be used to trigger this method call. The visible tables on the page are selected using
|
||||
the static <a href="//datatables.net/reference/api/%24.fn.dataTable.tables()"><code class="api" title="DataTables API method">$.fn.dataTable.tables()</code></a>
|
||||
method and running the <a href="//datatables.net/reference/api/columns.adjust()"><code class="api" title="DataTables API method">columns.adjust()</code></a> method
|
||||
on them.</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>
|
||||
<div>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="active"><a href="#tab-table1" data-toggle="tab">Table 1</a></li>
|
||||
<li><a href="#tab-table2" data-toggle="tab">Table 2</a></li>
|
||||
</ul>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Office</th>
|
||||
<th>Age</th>
|
||||
<th>Start date</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab-table1">
|
||||
<table id="myTable1" class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>Start date</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<div class="tab-pane" id="tab-table2">
|
||||
<table id="myTable2" class="table table-striped table-bordered" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Position</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>Start date</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="active">Javascript</li>
|
||||
@@ -556,66 +112,59 @@ $(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() {
|
||||
$("#tabs").tabs( {
|
||||
"activate": function(event, ui) {
|
||||
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
|
||||
}
|
||||
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
|
||||
$('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) {
|
||||
$.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
|
||||
} );
|
||||
|
||||
$('table.display').dataTable( {
|
||||
"scrollY": "200px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false,
|
||||
"jQueryUI": true
|
||||
$('table.table').DataTable( {
|
||||
ajax: '../ajax/data/arrays.txt',
|
||||
scrollY: 200,
|
||||
scrollCollapse: true,
|
||||
paging: false
|
||||
} );
|
||||
|
||||
// Apply a search to the second table for the demo
|
||||
$('#myTable2').DataTable().search( 'New York' ).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>
|
||||
<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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
|
||||
<li><a href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js">//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js</a></li>
|
||||
<li><a href="../../media/js/jquery.dataTables.js">../../media/js/jquery.dataTables.js</a></li>
|
||||
<li><a href="../../media/js/dataTables.bootstrap.js">../../media/js/dataTables.bootstrap.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=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css</a></li>
|
||||
<li><a href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css</a></li>
|
||||
<li><a href="../../media/css/dataTables.bootstrap.css">../../media/css/dataTables.bootstrap.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,17 +187,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -661,19 +208,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 with column visibility</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>
|
||||
|
||||
@@ -682,14 +228,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -707,9 +254,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><a href="./multi_filter.html">Individual column filtering (text inputs)</a></li>
|
||||
<li><a href="./multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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="./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>
|
||||
@@ -718,9 +264,8 @@ $(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><a href="./regex.html">Filtering API (regular expressions)</a></li>
|
||||
<li class="active"><a href="./tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -751,8 +296,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 +304,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 +313,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Alternative pagination</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"pagingType": "full_numbers"
|
||||
} );
|
||||
} );
|
||||
@@ -29,39 +30,32 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Alternative pagination</span></h1>
|
||||
<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=
|
||||
"Initialisation option">pagingType</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</code></a> option.</p>
|
||||
|
||||
<p>There are four built-in options for which pagination controls DataTables should show:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code class="string" title="String">numbers</code> - Page number buttons only</li>
|
||||
<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="Initialisation option">language.paginate.first</code></a>, <a href=
|
||||
"//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
|
||||
"Initialisation option">language.paginate.previous</code></a> etc.</p>
|
||||
<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</code></a>,
|
||||
<a href="//datatables.net/reference/option/language.paginate.previous"><code class="option" title=
|
||||
"DataTables initialisation option">language.paginate.previous</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%">
|
||||
@@ -557,53 +551,46 @@ $(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( {
|
||||
"pagingType": "full_numbers"
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -632,9 +619,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li class="active"><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -647,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 with column visibility</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>
|
||||
|
||||
@@ -668,14 +654,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -693,21 +680,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -738,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>
|
||||
|
||||
@@ -747,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>
|
||||
@@ -758,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Language - Comma decimal place</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"language": {
|
||||
"decimal": ",",
|
||||
"thousands": "."
|
||||
@@ -32,30 +33,24 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language - Comma decimal place</span></h1>
|
||||
<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>⎖</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>⎖</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=
|
||||
"Initialisation option">language.decimal</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</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=
|
||||
"Initialisation option">language.decimal</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</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%">
|
||||
@@ -551,9 +546,8 @@ $(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( {
|
||||
"language": {
|
||||
"decimal": ",",
|
||||
"thousands": "."
|
||||
@@ -561,46 +555,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +617,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><a href="./scroll_y_theme.html">Scroll - vertical with jQuery UI ThemeRoller</a></li>
|
||||
<li class="active"><a href="./comma-decimal.html">Language - Comma decimal place</a></li>
|
||||
<li><a href="./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 with column visibility</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>
|
||||
|
||||
@@ -665,14 +652,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -690,21 +678,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -735,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>
|
||||
|
||||
@@ -744,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>
|
||||
@@ -755,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Complex headers (rowspan and colspan)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
</script>
|
||||
@@ -27,19 +28,15 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Complex headers (rowspan and colspan)</span></h1>
|
||||
<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 irder listener, if more than
|
||||
one cell for a column if found. The <a href=
|
||||
"//datatables.net/reference/option/orderCellsTop"><code class="option" title=
|
||||
"Initialisation option">orderCellsTop</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</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>
|
||||
@@ -541,51 +538,44 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -608,16 +598,15 @@ $(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>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -630,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 with column visibility</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>
|
||||
|
||||
@@ -651,14 +639,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -676,21 +665,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - DOM positioning</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"dom": '<"top"i>rt<"bottom"flp><"clear">'
|
||||
} );
|
||||
} );
|
||||
@@ -29,25 +30,22 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- DOM positioning</span></h1>
|
||||
<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=
|
||||
"Initialisation option">dom</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</code></a> initialisation parameter which can be set to
|
||||
indicate where you wish 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=
|
||||
"Initialisation option">dom</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</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>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li><code>l</code> - <code>L</code>ength changing</li>
|
||||
<li><code>f</code> - <code>F</code>iltering input</li>
|
||||
<li><code>t</code> - The <code>T</code>able!</li>
|
||||
@@ -98,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="Initialisation option">dom</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</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%">
|
||||
@@ -603,53 +599,46 @@ $(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( {
|
||||
"dom": '<"top"i>rt<"bottom"flp><"clear">'
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +667,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -693,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 with column visibility</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,14 +702,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -739,21 +728,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -784,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>
|
||||
|
||||
@@ -793,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>
|
||||
@@ -804,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Feature enable / disable</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"paging": false,
|
||||
"ordering": false,
|
||||
"info": false
|
||||
@@ -31,12 +32,11 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Feature enable / disable</span></h1>
|
||||
<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%">
|
||||
@@ -532,55 +532,48 @@ $(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( {
|
||||
"paging": false,
|
||||
"ordering": false,
|
||||
"info": false
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +602,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -624,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 with column visibility</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>
|
||||
|
||||
@@ -645,14 +637,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -670,21 +663,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -715,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>
|
||||
|
||||
@@ -724,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>
|
||||
@@ -735,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Flexible table width</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -15,14 +16,14 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
</script>
|
||||
@@ -31,17 +32,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Flexible table width</span></h1>
|
||||
<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 or inline width style (<code>style="width:100%"</code>), 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%">
|
||||
@@ -537,53 +537,46 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -612,9 +605,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -627,19 +620,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 with column visibility</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>
|
||||
|
||||
@@ -648,14 +640,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -673,21 +666,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -718,8 +708,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>
|
||||
|
||||
@@ -727,10 +716,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>
|
||||
@@ -738,14 +725,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Hidden columns</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 2 ],
|
||||
@@ -39,25 +40,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Hidden columns</span></h1>
|
||||
<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=
|
||||
"Initialisation option">columns.visible</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 (consider also using the <a href=
|
||||
"https://datatables.net/extensions/responsive">Responsive extension</a> for this). This is done through the <a href=
|
||||
"//datatables.net/reference/option/columns.visible"><code class="option" title="DataTables initialisation option">columns.visible</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%">
|
||||
@@ -553,9 +550,8 @@ $(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( {
|
||||
"columnDefs": [
|
||||
{
|
||||
"targets": [ 2 ],
|
||||
@@ -570,46 +566,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +628,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -653,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 with column visibility</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>
|
||||
|
||||
@@ -674,14 +663,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -699,21 +689,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -744,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>
|
||||
|
||||
@@ -753,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>
|
||||
@@ -764,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,12 +16,11 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Basic initialisation</span></h1>
|
||||
<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>
|
||||
@@ -46,9 +46,9 @@
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -56,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Language options</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"language": {
|
||||
"lengthMenu": "Display _MENU_ records per page",
|
||||
"zeroRecords": "Nothing found - sorry",
|
||||
@@ -35,12 +36,11 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Language options</span></h1>
|
||||
<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=
|
||||
"Initialisation option">language</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</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>
|
||||
@@ -538,9 +538,8 @@ $(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( {
|
||||
"language": {
|
||||
"lengthMenu": "Display _MENU_ records per page",
|
||||
"zeroRecords": "Nothing found - sorry",
|
||||
@@ -551,46 +550,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +612,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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 class="active"><a href="./language.html">Language options</a></li>
|
||||
</ul>
|
||||
@@ -634,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 with column visibility</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>
|
||||
|
||||
@@ -655,14 +647,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -680,21 +673,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -725,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>
|
||||
|
||||
@@ -734,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>
|
||||
@@ -745,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Multi-column ordering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
columnDefs: [ {
|
||||
targets: [ 0 ],
|
||||
orderData: [ 0, 1 ]
|
||||
@@ -39,33 +40,25 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multi-column ordering</span></h1>
|
||||
<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>
|
||||
<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=
|
||||
"Initialisation option">columns.orderData</code></a> option.</li>
|
||||
<li>Using the <a href="//datatables.net/reference/option/columns.orderData"><code class="option"
|
||||
title="Initialisation option">columns.orderData</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=
|
||||
"API method">order()</code></a> API method.</li>
|
||||
<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</code></a> option.</li>
|
||||
<li>Using the <a href="//datatables.net/reference/option/columns.orderData"><code class="option" title=
|
||||
"DataTables initialisation option">columns.orderData</code></a> option to specify a multiple column order by default (for example <code>[ 0, 1 ]</code>).</li>
|
||||
<li>Through the <a href="//datatables.net/reference/api/order()"><code class="api" title="DataTables API method">order()</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=
|
||||
"Initialisation option">orderMulti</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</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%">
|
||||
@@ -492,9 +485,8 @@ $(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( {
|
||||
columnDefs: [ {
|
||||
targets: [ 0 ],
|
||||
orderData: [ 0, 1 ]
|
||||
@@ -508,46 +500,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -576,9 +562,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -591,19 +577,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 with column visibility</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>
|
||||
|
||||
@@ -612,14 +597,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -637,21 +623,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -682,8 +665,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>
|
||||
|
||||
@@ -691,10 +673,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>
|
||||
@@ -702,14 +682,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Multiple tables</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -15,14 +16,14 @@
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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() {
|
||||
$('table.display').dataTable();
|
||||
$('table.display').DataTable();
|
||||
} );
|
||||
|
||||
</script>
|
||||
@@ -31,21 +32,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Multiple tables</span></h1>
|
||||
<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%">
|
||||
@@ -255,53 +253,46 @@ $(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() {
|
||||
$('table.display').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() {
|
||||
$('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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">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>
|
||||
@@ -330,9 +321,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -345,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 with column visibility</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>
|
||||
|
||||
@@ -366,14 +356,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -391,21 +382,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -436,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>
|
||||
|
||||
@@ -445,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>
|
||||
@@ -456,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Scroll - horizontal</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -10,21 +11,20 @@
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
|
||||
th, td { white-space: nowrap; }
|
||||
div.dataTables_wrapper {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"scrollX": true
|
||||
} );
|
||||
} );
|
||||
@@ -35,23 +35,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - horizontal</span></h1>
|
||||
<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="Initialisation option">scrollX</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</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%">
|
||||
<table id="example" class="display nowrap" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>First name</th>
|
||||
@@ -707,57 +703,49 @@ $(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( {
|
||||
"scrollX": 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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">th, td { white-space: nowrap; }
|
||||
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 {
|
||||
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>
|
||||
@@ -786,9 +774,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</a></li>
|
||||
<li class="active"><a href="./scroll_x.html">Scroll - horizontal</a></li>
|
||||
<li><a href="./scroll_xy.html">Scroll - horizontal and vertical</a></li>
|
||||
<li><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>
|
||||
@@ -801,19 +789,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 with column visibility</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>
|
||||
|
||||
@@ -822,14 +809,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -847,21 +835,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -892,8 +877,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>
|
||||
|
||||
@@ -901,10 +885,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>
|
||||
@@ -912,14 +894,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Scroll - horizontal and vertical</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -10,21 +11,20 @@
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<style type="text/css" class="init">
|
||||
|
||||
th, td { white-space: nowrap; }
|
||||
div.dataTables_wrapper {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"scrollY": 200,
|
||||
"scrollX": true
|
||||
} );
|
||||
@@ -36,14 +36,14 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - horizontal and vertical</span></h1>
|
||||
<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%">
|
||||
<table id="example" class="display nowrap" cellspacing="0" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>First name</th>
|
||||
@@ -699,58 +699,50 @@ $(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( {
|
||||
"scrollY": 200,
|
||||
"scrollX": 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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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;">th, td { white-space: nowrap; }
|
||||
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 {
|
||||
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>
|
||||
@@ -779,9 +771,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</a></li>
|
||||
<li><a href="./scroll_x.html">Scroll - horizontal</a></li>
|
||||
<li class="active"><a href="./scroll_xy.html">Scroll - horizontal and vertical</a></li>
|
||||
<li><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>
|
||||
@@ -794,19 +786,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 with column visibility</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>
|
||||
|
||||
@@ -815,14 +806,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -840,21 +832,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -885,8 +874,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>
|
||||
|
||||
@@ -894,10 +882,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>
|
||||
@@ -905,14 +891,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Scroll - vertical</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"scrollY": "200px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false
|
||||
@@ -31,24 +32,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - vertical</span></h1>
|
||||
<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=
|
||||
"Initialisation option">scrollY</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</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="Initialisation option">scrollCollapse</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=
|
||||
"Initialisation option">scrollY</code></a>.</p>
|
||||
<p>Note also that the <a href="//datatables.net/reference/option/scrollCollapse"><code class="option" title=
|
||||
"DataTables initialisation option">scrollCollapse</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</code></a>.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -544,55 +542,48 @@ $(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( {
|
||||
"scrollY": "200px",
|
||||
"scrollCollapse": true,
|
||||
"paging": false
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +612,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li class="active"><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -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 with column visibility</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>
|
||||
|
||||
@@ -657,14 +647,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -682,21 +673,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -727,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>
|
||||
|
||||
@@ -736,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>
|
||||
@@ -747,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,27 +3,26 @@
|
||||
<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 - 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=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">
|
||||
<title>DataTables example - Scroll - vertical, dynamic height</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="//code.jquery.com/jquery-1.11.3.min.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( {
|
||||
"scrollY": 200,
|
||||
"scrollCollapse": true,
|
||||
"jQueryUI": true
|
||||
$('#example').DataTable( {
|
||||
scrollY: '50vh',
|
||||
scrollCollapse: true,
|
||||
paging: false
|
||||
} );
|
||||
} );
|
||||
|
||||
@@ -33,11 +32,16 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Scroll - vertical with jQuery UI ThemeRoller</span></h1>
|
||||
<h1>DataTables example <span>Scroll - vertical, dynamic height</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 shows a vertically scrolling DataTable that makes use of the CSS3 <code>vh</code> unit in order to dynamically resize the viewport based on the
|
||||
browser window height. The <a href="https://developer.mozilla.org/en/docs/Web/CSS/length#Viewport-percentage_lengths"><code>vh</code> unit</a> is effectively a
|
||||
percentage of the browser window height. So the <code>50vh</code> used in this example is 50% of the window height. The viewport size will update dynamically as
|
||||
the window is resized.</p>
|
||||
|
||||
<p>A relatively modern browser is <a href="http://caniuse.com/#feat=viewport-units">required for <code>vh</code> units</a> to operate correctly. IE9+ supports the
|
||||
<code>vh</code> unit and all other evergreen browsers.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -533,57 +537,48 @@ $(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( {
|
||||
"scrollY": 200,
|
||||
"scrollCollapse": true,
|
||||
"jQueryUI": true
|
||||
<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( {
|
||||
scrollY: '50vh',
|
||||
scrollCollapse: true,
|
||||
paging: false
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.css">//cdn.datatables.net/plug-ins/505bef35b56/integration/jqueryui/dataTables.jqueryui.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,10 +607,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li class="active"><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><a href="./comma-decimal.html">Language - Comma decimal place</a></li>
|
||||
<li><a href="./language.html">Language options</a></li>
|
||||
</ul>
|
||||
@@ -628,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 with column visibility</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>
|
||||
|
||||
@@ -649,14 +642,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -674,21 +668,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -719,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>
|
||||
|
||||
@@ -728,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>
|
||||
@@ -739,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - State saving</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,16 @@
|
||||
<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/jquery-1.11.3.min.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">
|
||||
|
||||
$('#example').dataTable( {
|
||||
"stateSave": true
|
||||
$(document).ready(function() {
|
||||
$('#example').DataTable( {
|
||||
stateSave: true
|
||||
} );
|
||||
} );
|
||||
|
||||
</script>
|
||||
@@ -27,32 +30,25 @@ $('#example').dataTable( {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- State saving</span></h1>
|
||||
<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=
|
||||
"Initialisation option">stateSave</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</code></a> option.</p>
|
||||
|
||||
<p>The built in state saving method uses the HTML5 <code>localStorage</code> API for efficient storage
|
||||
of the data. Please note that this means that the built in state saving option <em>will not work with
|
||||
IE6/7</em> as these browsers do not support this API. 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=
|
||||
"Initialisation option">stateSaveCallback</code></a> and <a href=
|
||||
"//datatables.net/reference/option/stateLoadCallback"><code class="option" title=
|
||||
"Initialisation option">stateLoadCallback</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</code></a> and <a href="//datatables.net/reference/option/stateLoadCallback"><code class=
|
||||
"option" title="DataTables initialisation option">stateLoadCallback</code></a> options.</p>
|
||||
|
||||
<p>Additionally, note also that 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=
|
||||
"Initialisation option">stateDuration</code></a> initialisation parameter (2 hours by default).</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</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=
|
||||
"Initialisation option">stateSave</code></a> option.</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=
|
||||
"DataTables initialisation option">stateSave</code></a> option.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -548,51 +544,46 @@ $('#example').dataTable( {
|
||||
|
||||
<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;">$('#example').dataTable( {
|
||||
"stateSave": true
|
||||
<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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,9 +612,9 @@ $('#example').dataTable( {
|
||||
<li class="active"><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -636,19 +627,18 @@ $('#example').dataTable( {
|
||||
<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 with column visibility</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>
|
||||
|
||||
@@ -657,14 +647,15 @@ $('#example').dataTable( {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -682,21 +673,18 @@ $('#example').dataTable( {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -727,8 +715,7 @@ $('#example').dataTable( {
|
||||
<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 +723,8 @@ $('#example').dataTable( {
|
||||
<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 +732,11 @@ $('#example').dataTable( {
|
||||
</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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Default ordering (sorting)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"order": [[ 3, "desc" ]]
|
||||
} );
|
||||
} );
|
||||
@@ -29,21 +30,17 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Default ordering (sorting)</span></h1>
|
||||
<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=
|
||||
"Initialisation option">order</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</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=
|
||||
"Initialisation option">order</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="Initialisation option">order</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</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</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>
|
||||
@@ -541,53 +538,46 @@ $(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( {
|
||||
"order": [[ 3, "desc" ]]
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -616,9 +606,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -631,19 +621,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 with column visibility</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>
|
||||
|
||||
@@ -652,14 +641,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -677,21 +667,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -722,8 +709,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>
|
||||
|
||||
@@ -731,10 +717,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>
|
||||
@@ -742,14 +726,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Zero configuration</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -29,14 +30,13 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Zero configuration</span></h1>
|
||||
<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:
|
||||
<code>$().DataTable();</code>.</p>
|
||||
|
||||
<p>Searching, ordering, paging etc goodness will be immediately added to the table, as shown in this
|
||||
example.</p>
|
||||
<p>Searching, ordering and paging goodness will be immediately added to the table, as shown in this example.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -532,51 +532,44 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -605,9 +598,9 @@ $(document).ready(function() {
|
||||
<li><a href="./state_save.html">State saving</a></li>
|
||||
<li><a href="./alt_pagination.html">Alternative pagination</a></li>
|
||||
<li><a href="./scroll_y.html">Scroll - vertical</a></li>
|
||||
<li><a href="./scroll_y_dynamic.html">Scroll - vertical, dynamic height</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><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>
|
||||
@@ -620,19 +613,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 with column visibility</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 +633,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -666,21 +659,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -711,8 +701,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>
|
||||
|
||||
@@ -720,10 +709,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>
|
||||
@@ -731,14 +718,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Ajax sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"ajax": '../ajax/data/arrays.txt'
|
||||
} );
|
||||
} );
|
||||
@@ -31,25 +32,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ajax sourced data</span></h1>
|
||||
<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=
|
||||
"Initialisation option">ajax</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</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=
|
||||
"Initialisation option">ajax</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=
|
||||
"Initialisation option">ajax</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</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</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=
|
||||
"Initialisation option">columns.data</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</code></a> option ).</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -86,53 +81,46 @@ $(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( {
|
||||
"ajax": '../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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +143,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -178,19 +164,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 with column visibility</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>
|
||||
|
||||
@@ -199,14 +184,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -224,21 +210,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -269,8 +252,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>
|
||||
|
||||
@@ -278,10 +260,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>
|
||||
@@ -289,14 +269,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - HTML (DOM) sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,7 +20,7 @@
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -29,16 +30,14 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- HTML (DOM) sourced data</span></h1>
|
||||
<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%">
|
||||
@@ -534,51 +533,44 @@ $(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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -601,17 +593,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -624,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 with column visibility</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>
|
||||
|
||||
@@ -645,14 +634,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -670,21 +660,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -715,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>
|
||||
|
||||
@@ -724,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>
|
||||
@@ -735,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,20 +16,20 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Data sources</span></h1>
|
||||
<h1>DataTables example <span>Data sources</span></h1>
|
||||
|
||||
<div class="info">
|
||||
<p>DataTables can obtain data from four different fundamental sources:</p>
|
||||
|
||||
<ul>
|
||||
<ul class="markdown">
|
||||
<li>HTML document (DOM)</li>
|
||||
<li>Javascript (array / objects)</li>
|
||||
<li>Ajax sourced data with client-side processing</li>
|
||||
<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>
|
||||
@@ -51,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Javascript sourced data</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -19,78 +20,56 @@
|
||||
|
||||
|
||||
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'],
|
||||
['Trident','Internet Explorer 6','Win 98+','6','A'],
|
||||
['Trident','Internet Explorer 7','Win XP SP2+','7','A'],
|
||||
['Trident','AOL browser (AOL desktop)','Win XP','6','A'],
|
||||
['Gecko','Firefox 1.0','Win 98+ / OSX.2+','1.7','A'],
|
||||
['Gecko','Firefox 1.5','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Firefox 2.0','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Firefox 3.0','Win 2k+ / OSX.3+','1.9','A'],
|
||||
['Gecko','Camino 1.0','OSX.2+','1.8','A'],
|
||||
['Gecko','Camino 1.5','OSX.3+','1.8','A'],
|
||||
['Gecko','Netscape 7.2','Win 95+ / Mac OS 8.6-9.2','1.7','A'],
|
||||
['Gecko','Netscape Browser 8','Win 98SE+','1.7','A'],
|
||||
['Gecko','Netscape Navigator 9','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Mozilla 1.0','Win 95+ / OSX.1+',1,'A'],
|
||||
['Gecko','Mozilla 1.1','Win 95+ / OSX.1+',1.1,'A'],
|
||||
['Gecko','Mozilla 1.2','Win 95+ / OSX.1+',1.2,'A'],
|
||||
['Gecko','Mozilla 1.3','Win 95+ / OSX.1+',1.3,'A'],
|
||||
['Gecko','Mozilla 1.4','Win 95+ / OSX.1+',1.4,'A'],
|
||||
['Gecko','Mozilla 1.5','Win 95+ / OSX.1+',1.5,'A'],
|
||||
['Gecko','Mozilla 1.6','Win 95+ / OSX.1+',1.6,'A'],
|
||||
['Gecko','Mozilla 1.7','Win 98+ / OSX.1+',1.7,'A'],
|
||||
['Gecko','Mozilla 1.8','Win 98+ / OSX.1+',1.8,'A'],
|
||||
['Gecko','Seamonkey 1.1','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Epiphany 2.20','Gnome','1.8','A'],
|
||||
['Webkit','Safari 1.2','OSX.3','125.5','A'],
|
||||
['Webkit','Safari 1.3','OSX.3','312.8','A'],
|
||||
['Webkit','Safari 2.0','OSX.4+','419.3','A'],
|
||||
['Webkit','Safari 3.0','OSX.4+','522.1','A'],
|
||||
['Webkit','OmniWeb 5.5','OSX.4+','420','A'],
|
||||
['Webkit','iPod Touch / iPhone','iPod','420.1','A'],
|
||||
['Webkit','S60','S60','413','A'],
|
||||
['Presto','Opera 7.0','Win 95+ / OSX.1+','-','A'],
|
||||
['Presto','Opera 7.5','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 8.0','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 8.5','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 9.0','Win 95+ / OSX.3+','-','A'],
|
||||
['Presto','Opera 9.2','Win 88+ / OSX.3+','-','A'],
|
||||
['Presto','Opera 9.5','Win 88+ / OSX.3+','-','A'],
|
||||
['Presto','Opera for Wii','Wii','-','A'],
|
||||
['Presto','Nokia N800','N800','-','A'],
|
||||
['Presto','Nintendo DS browser','Nintendo DS','8.5','C/A<sup>1</sup>'],
|
||||
['KHTML','Konqureror 3.1','KDE 3.1','3.1','C'],
|
||||
['KHTML','Konqureror 3.3','KDE 3.3','3.3','A'],
|
||||
['KHTML','Konqureror 3.5','KDE 3.5','3.5','A'],
|
||||
['Tasman','Internet Explorer 4.5','Mac OS 8-9','-','X'],
|
||||
['Tasman','Internet Explorer 5.1','Mac OS 7.6-9','1','C'],
|
||||
['Tasman','Internet Explorer 5.2','Mac OS 8-X','1','C'],
|
||||
['Misc','NetFront 3.1','Embedded devices','-','C'],
|
||||
['Misc','NetFront 3.4','Embedded devices','-','A'],
|
||||
['Misc','Dillo 0.8','Embedded devices','-','X'],
|
||||
['Misc','Links','Text only','-','X'],
|
||||
['Misc','Lynx','Text only','-','X'],
|
||||
['Misc','IE Mobile','Windows Mobile 6','-','C'],
|
||||
['Misc','PSP browser','PSP','-','C'],
|
||||
['Other browsers','All others','-','-','U']
|
||||
[ "Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800" ],
|
||||
[ "Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750" ],
|
||||
[ "Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000" ],
|
||||
[ "Cedric Kelly", "Senior Javascript Developer", "Edinburgh", "6224", "2012/03/29", "$433,060" ],
|
||||
[ "Airi Satou", "Accountant", "Tokyo", "5407", "2008/11/28", "$162,700" ],
|
||||
[ "Brielle Williamson", "Integration Specialist", "New York", "4804", "2012/12/02", "$372,000" ],
|
||||
[ "Herrod Chandler", "Sales Assistant", "San Francisco", "9608", "2012/08/06", "$137,500" ],
|
||||
[ "Rhona Davidson", "Integration Specialist", "Tokyo", "6200", "2010/10/14", "$327,900" ],
|
||||
[ "Colleen Hurst", "Javascript Developer", "San Francisco", "2360", "2009/09/15", "$205,500" ],
|
||||
[ "Sonya Frost", "Software Engineer", "Edinburgh", "1667", "2008/12/13", "$103,600" ],
|
||||
[ "Jena Gaines", "Office Manager", "London", "3814", "2008/12/19", "$90,560" ],
|
||||
[ "Quinn Flynn", "Support Lead", "Edinburgh", "9497", "2013/03/03", "$342,000" ],
|
||||
[ "Charde Marshall", "Regional Director", "San Francisco", "6741", "2008/10/16", "$470,600" ],
|
||||
[ "Haley Kennedy", "Senior Marketing Designer", "London", "3597", "2012/12/18", "$313,500" ],
|
||||
[ "Tatyana Fitzpatrick", "Regional Director", "London", "1965", "2010/03/17", "$385,750" ],
|
||||
[ "Michael Silva", "Marketing Designer", "London", "1581", "2012/11/27", "$198,500" ],
|
||||
[ "Paul Byrd", "Chief Financial Officer (CFO)", "New York", "3059", "2010/06/09", "$725,000" ],
|
||||
[ "Gloria Little", "Systems Administrator", "New York", "1721", "2009/04/10", "$237,500" ],
|
||||
[ "Bradley Greer", "Software Engineer", "London", "2558", "2012/10/13", "$132,000" ],
|
||||
[ "Dai Rios", "Personnel Lead", "Edinburgh", "2290", "2012/09/26", "$217,500" ],
|
||||
[ "Jenette Caldwell", "Development Lead", "New York", "1937", "2011/09/03", "$345,000" ],
|
||||
[ "Yuri Berry", "Chief Marketing Officer (CMO)", "New York", "6154", "2009/06/25", "$675,000" ],
|
||||
[ "Caesar Vance", "Pre-Sales Support", "New York", "8330", "2011/12/12", "$106,450" ],
|
||||
[ "Doris Wilder", "Sales Assistant", "Sidney", "3023", "2010/09/20", "$85,600" ],
|
||||
[ "Angelica Ramos", "Chief Executive Officer (CEO)", "London", "5797", "2009/10/09", "$1,200,000" ],
|
||||
[ "Gavin Joyce", "Developer", "Edinburgh", "8822", "2010/12/22", "$92,575" ],
|
||||
[ "Jennifer Chang", "Regional Director", "Singapore", "9239", "2010/11/14", "$357,650" ],
|
||||
[ "Brenden Wagner", "Software Engineer", "San Francisco", "1314", "2011/06/07", "$206,850" ],
|
||||
[ "Fiona Green", "Chief Operating Officer (COO)", "San Francisco", "2947", "2010/03/11", "$850,000" ],
|
||||
[ "Shou Itou", "Regional Marketing", "Tokyo", "8899", "2011/08/14", "$163,000" ],
|
||||
[ "Michelle House", "Integration Specialist", "Sidney", "2769", "2011/06/02", "$95,400" ],
|
||||
[ "Suki Burks", "Developer", "London", "6832", "2009/10/22", "$114,500" ],
|
||||
[ "Prescott Bartlett", "Technical Author", "London", "3606", "2011/05/07", "$145,000" ],
|
||||
[ "Gavin Cortez", "Team Leader", "San Francisco", "2860", "2008/10/26", "$235,500" ],
|
||||
[ "Martena Mccray", "Post-Sales support", "Edinburgh", "8240", "2011/03/09", "$324,050" ],
|
||||
[ "Unity Butler", "Marketing Designer", "San Francisco", "5384", "2009/12/09", "$85,675" ]
|
||||
];
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#demo').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
|
||||
|
||||
$('#example').dataTable( {
|
||||
"data": dataSet,
|
||||
"columns": [
|
||||
{ "title": "Engine" },
|
||||
{ "title": "Browser" },
|
||||
{ "title": "Platform" },
|
||||
{ "title": "Version", "class": "center" },
|
||||
{ "title": "Grade", "class": "center" }
|
||||
$('#example').DataTable( {
|
||||
data: dataSet,
|
||||
columns: [
|
||||
{ title: "Name" },
|
||||
{ title: "Position" },
|
||||
{ title: "Office" },
|
||||
{ title: "Extn." },
|
||||
{ title: "Start date" },
|
||||
{ title: "Salary" }
|
||||
]
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
@@ -100,22 +79,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Javascript sourced data</span></h1>
|
||||
<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=
|
||||
"Initialisation option">data</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=
|
||||
"Initialisation option">columns.data</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</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</code></a> option).</p>
|
||||
|
||||
<p>A <code><table></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 class="tag" title="HTML tag">table</code> must be available on the page for DataTables to use. This examples shows an empty <code class="tag" title=
|
||||
"HTML tag">table</code> element being initialising as a DataTable with a set of data from a Javascript array. The columns in the table are dynamically created
|
||||
based on the <a href="//datatables.net/reference/option/columns.title"><code class="option" title="DataTables initialisation option">columns.title</code></a>
|
||||
configuration option.</p>
|
||||
</div>
|
||||
<div id="demo">
|
||||
|
||||
<table id="example" class="display" width="100%"></table>
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="active">Javascript</li>
|
||||
@@ -127,122 +105,93 @@ $(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 = [
|
||||
['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'],
|
||||
['Trident','Internet Explorer 6','Win 98+','6','A'],
|
||||
['Trident','Internet Explorer 7','Win XP SP2+','7','A'],
|
||||
['Trident','AOL browser (AOL desktop)','Win XP','6','A'],
|
||||
['Gecko','Firefox 1.0','Win 98+ / OSX.2+','1.7','A'],
|
||||
['Gecko','Firefox 1.5','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Firefox 2.0','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Firefox 3.0','Win 2k+ / OSX.3+','1.9','A'],
|
||||
['Gecko','Camino 1.0','OSX.2+','1.8','A'],
|
||||
['Gecko','Camino 1.5','OSX.3+','1.8','A'],
|
||||
['Gecko','Netscape 7.2','Win 95+ / Mac OS 8.6-9.2','1.7','A'],
|
||||
['Gecko','Netscape Browser 8','Win 98SE+','1.7','A'],
|
||||
['Gecko','Netscape Navigator 9','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Mozilla 1.0','Win 95+ / OSX.1+',1,'A'],
|
||||
['Gecko','Mozilla 1.1','Win 95+ / OSX.1+',1.1,'A'],
|
||||
['Gecko','Mozilla 1.2','Win 95+ / OSX.1+',1.2,'A'],
|
||||
['Gecko','Mozilla 1.3','Win 95+ / OSX.1+',1.3,'A'],
|
||||
['Gecko','Mozilla 1.4','Win 95+ / OSX.1+',1.4,'A'],
|
||||
['Gecko','Mozilla 1.5','Win 95+ / OSX.1+',1.5,'A'],
|
||||
['Gecko','Mozilla 1.6','Win 95+ / OSX.1+',1.6,'A'],
|
||||
['Gecko','Mozilla 1.7','Win 98+ / OSX.1+',1.7,'A'],
|
||||
['Gecko','Mozilla 1.8','Win 98+ / OSX.1+',1.8,'A'],
|
||||
['Gecko','Seamonkey 1.1','Win 98+ / OSX.2+','1.8','A'],
|
||||
['Gecko','Epiphany 2.20','Gnome','1.8','A'],
|
||||
['Webkit','Safari 1.2','OSX.3','125.5','A'],
|
||||
['Webkit','Safari 1.3','OSX.3','312.8','A'],
|
||||
['Webkit','Safari 2.0','OSX.4+','419.3','A'],
|
||||
['Webkit','Safari 3.0','OSX.4+','522.1','A'],
|
||||
['Webkit','OmniWeb 5.5','OSX.4+','420','A'],
|
||||
['Webkit','iPod Touch / iPhone','iPod','420.1','A'],
|
||||
['Webkit','S60','S60','413','A'],
|
||||
['Presto','Opera 7.0','Win 95+ / OSX.1+','-','A'],
|
||||
['Presto','Opera 7.5','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 8.0','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 8.5','Win 95+ / OSX.2+','-','A'],
|
||||
['Presto','Opera 9.0','Win 95+ / OSX.3+','-','A'],
|
||||
['Presto','Opera 9.2','Win 88+ / OSX.3+','-','A'],
|
||||
['Presto','Opera 9.5','Win 88+ / OSX.3+','-','A'],
|
||||
['Presto','Opera for Wii','Wii','-','A'],
|
||||
['Presto','Nokia N800','N800','-','A'],
|
||||
['Presto','Nintendo DS browser','Nintendo DS','8.5','C/A<sup>1</sup>'],
|
||||
['KHTML','Konqureror 3.1','KDE 3.1','3.1','C'],
|
||||
['KHTML','Konqureror 3.3','KDE 3.3','3.3','A'],
|
||||
['KHTML','Konqureror 3.5','KDE 3.5','3.5','A'],
|
||||
['Tasman','Internet Explorer 4.5','Mac OS 8-9','-','X'],
|
||||
['Tasman','Internet Explorer 5.1','Mac OS 7.6-9','1','C'],
|
||||
['Tasman','Internet Explorer 5.2','Mac OS 8-X','1','C'],
|
||||
['Misc','NetFront 3.1','Embedded devices','-','C'],
|
||||
['Misc','NetFront 3.4','Embedded devices','-','A'],
|
||||
['Misc','Dillo 0.8','Embedded devices','-','X'],
|
||||
['Misc','Links','Text only','-','X'],
|
||||
['Misc','Lynx','Text only','-','X'],
|
||||
['Misc','IE Mobile','Windows Mobile 6','-','C'],
|
||||
['Misc','PSP browser','PSP','-','C'],
|
||||
['Other browsers','All others','-','-','U']
|
||||
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">var dataSet = [
|
||||
[ "Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800" ],
|
||||
[ "Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750" ],
|
||||
[ "Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000" ],
|
||||
[ "Cedric Kelly", "Senior Javascript Developer", "Edinburgh", "6224", "2012/03/29", "$433,060" ],
|
||||
[ "Airi Satou", "Accountant", "Tokyo", "5407", "2008/11/28", "$162,700" ],
|
||||
[ "Brielle Williamson", "Integration Specialist", "New York", "4804", "2012/12/02", "$372,000" ],
|
||||
[ "Herrod Chandler", "Sales Assistant", "San Francisco", "9608", "2012/08/06", "$137,500" ],
|
||||
[ "Rhona Davidson", "Integration Specialist", "Tokyo", "6200", "2010/10/14", "$327,900" ],
|
||||
[ "Colleen Hurst", "Javascript Developer", "San Francisco", "2360", "2009/09/15", "$205,500" ],
|
||||
[ "Sonya Frost", "Software Engineer", "Edinburgh", "1667", "2008/12/13", "$103,600" ],
|
||||
[ "Jena Gaines", "Office Manager", "London", "3814", "2008/12/19", "$90,560" ],
|
||||
[ "Quinn Flynn", "Support Lead", "Edinburgh", "9497", "2013/03/03", "$342,000" ],
|
||||
[ "Charde Marshall", "Regional Director", "San Francisco", "6741", "2008/10/16", "$470,600" ],
|
||||
[ "Haley Kennedy", "Senior Marketing Designer", "London", "3597", "2012/12/18", "$313,500" ],
|
||||
[ "Tatyana Fitzpatrick", "Regional Director", "London", "1965", "2010/03/17", "$385,750" ],
|
||||
[ "Michael Silva", "Marketing Designer", "London", "1581", "2012/11/27", "$198,500" ],
|
||||
[ "Paul Byrd", "Chief Financial Officer (CFO)", "New York", "3059", "2010/06/09", "$725,000" ],
|
||||
[ "Gloria Little", "Systems Administrator", "New York", "1721", "2009/04/10", "$237,500" ],
|
||||
[ "Bradley Greer", "Software Engineer", "London", "2558", "2012/10/13", "$132,000" ],
|
||||
[ "Dai Rios", "Personnel Lead", "Edinburgh", "2290", "2012/09/26", "$217,500" ],
|
||||
[ "Jenette Caldwell", "Development Lead", "New York", "1937", "2011/09/03", "$345,000" ],
|
||||
[ "Yuri Berry", "Chief Marketing Officer (CMO)", "New York", "6154", "2009/06/25", "$675,000" ],
|
||||
[ "Caesar Vance", "Pre-Sales Support", "New York", "8330", "2011/12/12", "$106,450" ],
|
||||
[ "Doris Wilder", "Sales Assistant", "Sidney", "3023", "2010/09/20", "$85,600" ],
|
||||
[ "Angelica Ramos", "Chief Executive Officer (CEO)", "London", "5797", "2009/10/09", "$1,200,000" ],
|
||||
[ "Gavin Joyce", "Developer", "Edinburgh", "8822", "2010/12/22", "$92,575" ],
|
||||
[ "Jennifer Chang", "Regional Director", "Singapore", "9239", "2010/11/14", "$357,650" ],
|
||||
[ "Brenden Wagner", "Software Engineer", "San Francisco", "1314", "2011/06/07", "$206,850" ],
|
||||
[ "Fiona Green", "Chief Operating Officer (COO)", "San Francisco", "2947", "2010/03/11", "$850,000" ],
|
||||
[ "Shou Itou", "Regional Marketing", "Tokyo", "8899", "2011/08/14", "$163,000" ],
|
||||
[ "Michelle House", "Integration Specialist", "Sidney", "2769", "2011/06/02", "$95,400" ],
|
||||
[ "Suki Burks", "Developer", "London", "6832", "2009/10/22", "$114,500" ],
|
||||
[ "Prescott Bartlett", "Technical Author", "London", "3606", "2011/05/07", "$145,000" ],
|
||||
[ "Gavin Cortez", "Team Leader", "San Francisco", "2860", "2008/10/26", "$235,500" ],
|
||||
[ "Martena Mccray", "Post-Sales support", "Edinburgh", "8240", "2011/03/09", "$324,050" ],
|
||||
[ "Unity Butler", "Marketing Designer", "San Francisco", "5384", "2009/12/09", "$85,675" ]
|
||||
];
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#demo').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
|
||||
|
||||
$('#example').dataTable( {
|
||||
"data": dataSet,
|
||||
"columns": [
|
||||
{ "title": "Engine" },
|
||||
{ "title": "Browser" },
|
||||
{ "title": "Platform" },
|
||||
{ "title": "Version", "class": "center" },
|
||||
{ "title": "Grade", "class": "center" }
|
||||
$('#example').DataTable( {
|
||||
data: dataSet,
|
||||
columns: [
|
||||
{ title: "Name" },
|
||||
{ title: "Position" },
|
||||
{ title: "Office" },
|
||||
{ title: "Extn." },
|
||||
{ title: "Start date" },
|
||||
{ title: "Salary" }
|
||||
]
|
||||
} );
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -265,17 +214,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -288,19 +235,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 with column visibility</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>
|
||||
|
||||
@@ -309,14 +255,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -334,21 +281,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -379,8 +323,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>
|
||||
|
||||
@@ -388,10 +331,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>
|
||||
@@ -399,14 +340,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Server-side processing</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,14 +12,14 @@
|
||||
<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/jquery-1.11.3.min.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( {
|
||||
$('#example').DataTable( {
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": "../server_side/scripts/server_processing.php"
|
||||
@@ -31,34 +32,29 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Server-side processing</span></h1>
|
||||
<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=
|
||||
"Initialisation option">serverSide</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=
|
||||
"Initialisation option">ajax</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</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</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%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>First name</th>
|
||||
<th>Last name</th>
|
||||
<th>Position</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>Start date</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
@@ -66,10 +62,10 @@ $(document).ready(function() {
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>First name</th>
|
||||
<th>Last name</th>
|
||||
<th>Position</th>
|
||||
<th>Office</th>
|
||||
<th>Extn.</th>
|
||||
<th>Start date</th>
|
||||
<th>Salary</th>
|
||||
</tr>
|
||||
@@ -86,55 +82,48 @@ $(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( {
|
||||
"processing": true,
|
||||
"serverSide": true,
|
||||
"ajax": "../server_side/scripts/server_processing.php"
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +146,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -180,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 with column visibility</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>
|
||||
|
||||
@@ -201,14 +187,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -226,21 +213,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -271,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>
|
||||
|
||||
@@ -280,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>
|
||||
@@ -291,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="./resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="./resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,13 +16,12 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Examples index</span></h1>
|
||||
<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>
|
||||
@@ -41,17 +41,15 @@
|
||||
<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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -64,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 with column visibility</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>
|
||||
|
||||
@@ -85,14 +82,15 @@
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -110,20 +108,18 @@
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="./api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="./api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="./api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -154,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>
|
||||
|
||||
@@ -172,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - API plug-in methods</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -50,23 +51,18 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- API plug-in methods</span></h1>
|
||||
<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=
|
||||
"API method">column()</code></a> method and the options for its selectors.</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()</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">
|
||||
|
||||
@@ -563,8 +559,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;
|
||||
@@ -589,46 +584,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -651,17 +640,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -674,19 +661,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 with column visibility</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>
|
||||
|
||||
@@ -695,14 +681,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -720,21 +707,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -765,8 +749,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>
|
||||
|
||||
@@ -783,14 +766,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Live DOM ordering</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -26,6 +27,14 @@ $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
||||
$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col )
|
||||
{
|
||||
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
||||
return $('input', td).val() * 1;
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the select options in a column */
|
||||
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
||||
{
|
||||
@@ -44,11 +53,11 @@ $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
|
||||
|
||||
/* Initialise the table with the required column ordering data types */
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columns": [
|
||||
null,
|
||||
{ "orderDataType": "dom-text", "type": "numeric" },
|
||||
{ "orderDataType": "dom-text" },
|
||||
{ "orderDataType": "dom-text-numeric" },
|
||||
{ "orderDataType": "dom-text", type: 'string' },
|
||||
{ "orderDataType": "dom-select" }
|
||||
]
|
||||
} );
|
||||
@@ -61,26 +70,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Live DOM ordering</span></h1>
|
||||
<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="API method">order()</code></a> or
|
||||
<a href="//datatables.net/reference/api/draw()"><code class="api" title="API method">draw()</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()</code></a> or <a href=
|
||||
"//datatables.net/reference/api/draw()"><code class="api" title="DataTables API method">draw()</code></a> methods.</p>
|
||||
</div>
|
||||
|
||||
<table id="example" class="display" cellspacing="0" width="100%">
|
||||
@@ -158,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
|
||||
@@ -185,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
|
||||
@@ -238,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
|
||||
@@ -291,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
|
||||
@@ -318,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
|
||||
@@ -345,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
|
||||
@@ -424,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
|
||||
@@ -451,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
|
||||
@@ -478,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
|
||||
@@ -505,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
|
||||
@@ -532,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
|
||||
@@ -559,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
|
||||
@@ -586,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
|
||||
@@ -639,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
|
||||
@@ -666,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
|
||||
@@ -693,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
|
||||
@@ -720,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
|
||||
@@ -747,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
|
||||
@@ -800,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
|
||||
@@ -827,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
|
||||
@@ -854,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
|
||||
@@ -881,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
|
||||
@@ -908,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
|
||||
@@ -961,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
|
||||
@@ -1014,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
|
||||
@@ -1041,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
|
||||
@@ -1120,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
|
||||
@@ -1199,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
|
||||
@@ -1226,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
|
||||
@@ -1253,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
|
||||
@@ -1306,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
|
||||
@@ -1333,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
|
||||
@@ -1360,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
|
||||
@@ -1387,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
|
||||
@@ -1414,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
|
||||
@@ -1441,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
|
||||
@@ -1468,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
|
||||
@@ -1495,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
|
||||
@@ -1548,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
|
||||
@@ -1575,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
|
||||
@@ -1602,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
|
||||
@@ -1639,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 ) {
|
||||
@@ -1648,6 +1610,14 @@ $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the input boxes in a column, parsed as numbers */
|
||||
$.fn.dataTable.ext.order['dom-text-numeric'] = function ( settings, col )
|
||||
{
|
||||
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
||||
return $('input', td).val() * 1;
|
||||
} );
|
||||
}
|
||||
|
||||
/* Create an array with the values of all the select options in a column */
|
||||
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
||||
{
|
||||
@@ -1666,56 +1636,50 @@ $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
|
||||
|
||||
/* Initialise the table with the required column ordering data types */
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columns": [
|
||||
null,
|
||||
{ "orderDataType": "dom-text", "type": "numeric" },
|
||||
{ "orderDataType": "dom-text" },
|
||||
{ "orderDataType": "dom-text-numeric" },
|
||||
{ "orderDataType": "dom-text", type: 'string' },
|
||||
{ "orderDataType": "dom-select" }
|
||||
]
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -1738,17 +1702,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -1761,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 with column visibility</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>
|
||||
|
||||
@@ -1782,14 +1743,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -1807,21 +1769,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1852,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>
|
||||
|
||||
@@ -1870,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<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">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/syntax/shCore.css">
|
||||
<link rel="stylesheet" type="text/css" href="../resources/demo.css">
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.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>
|
||||
|
||||
@@ -15,13 +16,12 @@
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Plug-ins</span></h1>
|
||||
<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>
|
||||
@@ -47,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Custom filtering - range search</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -21,14 +22,14 @@
|
||||
/* Custom filtering function which will search data in column four between two values */
|
||||
$.fn.dataTable.ext.search.push(
|
||||
function( settings, data, dataIndex ) {
|
||||
var min = $('#min').val() * 1;
|
||||
var max = $('#max').val() * 1;
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var age = parseFloat( data[3] ) || 0; // use data for the age column
|
||||
|
||||
if ( ( min == '' && max == '' ) ||
|
||||
( min == '' && age <= max ) ||
|
||||
( min <= age && '' == max ) ||
|
||||
( min <= age && age <= max ) )
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && age <= max ) ||
|
||||
( min <= age && isNaN( max ) ) ||
|
||||
( min <= age && age <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -52,17 +53,14 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Custom filtering - range search</span></h1>
|
||||
<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">
|
||||
@@ -569,18 +567,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;">/* 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 = $('#min').val() * 1;
|
||||
var max = $('#max').val() * 1;
|
||||
var min = parseInt( $('#min').val(), 10 );
|
||||
var max = parseInt( $('#max').val(), 10 );
|
||||
var age = parseFloat( data[3] ) || 0; // use data for the age column
|
||||
|
||||
if ( ( min == '' && max == '' ) ||
|
||||
( min == '' && age <= max ) ||
|
||||
( min <= age && '' == max ) ||
|
||||
( min <= age && age <= max ) )
|
||||
if ( ( isNaN( min ) && isNaN( max ) ) ||
|
||||
( isNaN( min ) && age <= max ) ||
|
||||
( min <= age && isNaN( max ) ) ||
|
||||
( min <= age && age <= max ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -597,46 +594,40 @@ $(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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -659,17 +650,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -682,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 with column visibility</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>
|
||||
|
||||
@@ -703,14 +691,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -728,21 +717,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -773,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>
|
||||
|
||||
@@ -784,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Ordering plug-ins (with type detection)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,7 +12,7 @@
|
||||
<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/jquery-1.11.3.min.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>
|
||||
@@ -20,17 +21,24 @@
|
||||
|
||||
$.fn.dataTable.ext.type.detect.unshift(
|
||||
function ( d ) {
|
||||
return /^[\-\d,]+$/.test( d ) ? 'numeric-comma' : null;
|
||||
return d === 'Low' || d === 'Medium' || d === 'High' ?
|
||||
'salary-grade' :
|
||||
null;
|
||||
}
|
||||
);
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#example').DataTable();
|
||||
} );
|
||||
|
||||
|
||||
@@ -40,24 +48,19 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ordering plug-ins (with type detection)</span></h1>
|
||||
<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 a comma for a decimal place, as is often used in parts of Europe
|
||||
with automatic type detection.</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%">
|
||||
@@ -90,7 +93,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td>2011/04/25</td>
|
||||
<td>$320.800,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Garrett Winters</td>
|
||||
@@ -98,7 +101,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td>2011/07/25</td>
|
||||
<td>$170.750,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ashton Cox</td>
|
||||
@@ -106,7 +109,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td>2009/01/12</td>
|
||||
<td>$86.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cedric Kelly</td>
|
||||
@@ -114,7 +117,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2012/03/29</td>
|
||||
<td>$433.060,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Airi Satou</td>
|
||||
@@ -122,7 +125,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td>2008/11/28</td>
|
||||
<td>$162.700,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brielle Williamson</td>
|
||||
@@ -130,7 +133,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2012/12/02</td>
|
||||
<td>$372.000,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Herrod Chandler</td>
|
||||
@@ -138,7 +141,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td>2012/08/06</td>
|
||||
<td>$137.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rhona Davidson</td>
|
||||
@@ -146,7 +149,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td>2010/10/14</td>
|
||||
<td>$327.900,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Colleen Hurst</td>
|
||||
@@ -154,7 +157,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td>2009/09/15</td>
|
||||
<td>$205.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonya Frost</td>
|
||||
@@ -162,7 +165,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td>2008/12/13</td>
|
||||
<td>$103.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jena Gaines</td>
|
||||
@@ -170,7 +173,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td>2008/12/19</td>
|
||||
<td>$90.560,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn Flynn</td>
|
||||
@@ -178,7 +181,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2013/03/03</td>
|
||||
<td>$342.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charde Marshall</td>
|
||||
@@ -186,7 +189,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td>2008/10/16</td>
|
||||
<td>$470.600,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Haley Kennedy</td>
|
||||
@@ -194,7 +197,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td>2012/12/18</td>
|
||||
<td>$313.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tatyana Fitzpatrick</td>
|
||||
@@ -202,7 +205,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td>2010/03/17</td>
|
||||
<td>$385.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Silva</td>
|
||||
@@ -210,7 +213,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td>2012/11/27</td>
|
||||
<td>$198.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Paul Byrd</td>
|
||||
@@ -218,7 +221,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td>2010/06/09</td>
|
||||
<td>$725.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gloria Little</td>
|
||||
@@ -226,7 +229,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td>2009/04/10</td>
|
||||
<td>$237.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bradley Greer</td>
|
||||
@@ -234,7 +237,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td>2012/10/13</td>
|
||||
<td>$132.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dai Rios</td>
|
||||
@@ -242,7 +245,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td>2012/09/26</td>
|
||||
<td>$217.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jenette Caldwell</td>
|
||||
@@ -250,7 +253,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td>2011/09/03</td>
|
||||
<td>$345.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yuri Berry</td>
|
||||
@@ -258,7 +261,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td>2009/06/25</td>
|
||||
<td>$675.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caesar Vance</td>
|
||||
@@ -266,7 +269,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td>2011/12/12</td>
|
||||
<td>$106.450,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doris Wilder</td>
|
||||
@@ -274,7 +277,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td>2010/09/20</td>
|
||||
<td>$85.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Angelica Ramos</td>
|
||||
@@ -282,7 +285,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2009/10/09</td>
|
||||
<td>$1.200.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Joyce</td>
|
||||
@@ -290,7 +293,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td>2010/12/22</td>
|
||||
<td>$92.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Chang</td>
|
||||
@@ -298,7 +301,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td>2010/11/14</td>
|
||||
<td>$357.650,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brenden Wagner</td>
|
||||
@@ -306,7 +309,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td>2011/06/07</td>
|
||||
<td>$206.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fiona Green</td>
|
||||
@@ -314,7 +317,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td>2010/03/11</td>
|
||||
<td>$850.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shou Itou</td>
|
||||
@@ -322,7 +325,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td>2011/08/14</td>
|
||||
<td>$163.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michelle House</td>
|
||||
@@ -330,7 +333,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td>2011/06/02</td>
|
||||
<td>$95.400,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suki Burks</td>
|
||||
@@ -338,7 +341,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td>2009/10/22</td>
|
||||
<td>$114.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prescott Bartlett</td>
|
||||
@@ -346,7 +349,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td>2011/05/07</td>
|
||||
<td>$145.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Cortez</td>
|
||||
@@ -354,7 +357,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td>2008/10/26</td>
|
||||
<td>$235.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Martena Mccray</td>
|
||||
@@ -362,7 +365,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td>2011/03/09</td>
|
||||
<td>$324.050,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unity Butler</td>
|
||||
@@ -370,7 +373,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/12/09</td>
|
||||
<td>$85.675,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Howard Hatfield</td>
|
||||
@@ -378,7 +381,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td>2008/12/16</td>
|
||||
<td>$164.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hope Fuentes</td>
|
||||
@@ -386,7 +389,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td>2010/02/12</td>
|
||||
<td>$109.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vivian Harrell</td>
|
||||
@@ -394,7 +397,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td>2009/02/14</td>
|
||||
<td>$452.500,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timothy Mooney</td>
|
||||
@@ -402,7 +405,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td>2008/12/11</td>
|
||||
<td>$136.200,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jackson Bradshaw</td>
|
||||
@@ -410,7 +413,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td>2008/09/26</td>
|
||||
<td>$645.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Olivia Liang</td>
|
||||
@@ -418,7 +421,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2011/02/03</td>
|
||||
<td>$234.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bruno Nash</td>
|
||||
@@ -426,7 +429,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td>2011/05/03</td>
|
||||
<td>$163.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sakura Yamamoto</td>
|
||||
@@ -434,7 +437,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td>2009/08/19</td>
|
||||
<td>$139.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thor Walton</td>
|
||||
@@ -442,7 +445,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2013/08/11</td>
|
||||
<td>$98.540,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Finn Camacho</td>
|
||||
@@ -450,7 +453,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/07/07</td>
|
||||
<td>$87.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serge Baldwin</td>
|
||||
@@ -458,7 +461,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2012/04/09</td>
|
||||
<td>$138.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zenaida Frank</td>
|
||||
@@ -466,7 +469,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td>2010/01/04</td>
|
||||
<td>$125.250,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zorita Serrano</td>
|
||||
@@ -474,7 +477,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td>2012/06/01</td>
|
||||
<td>$115.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Acosta</td>
|
||||
@@ -482,7 +485,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td>2013/02/01</td>
|
||||
<td>$75.650,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cara Stevens</td>
|
||||
@@ -490,7 +493,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td>2011/12/06</td>
|
||||
<td>$145.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hermione Butler</td>
|
||||
@@ -498,7 +501,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2011/03/21</td>
|
||||
<td>$356.250,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lael Greer</td>
|
||||
@@ -506,7 +509,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td>2009/02/27</td>
|
||||
<td>$103.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jonas Alexander</td>
|
||||
@@ -514,7 +517,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td>2010/07/14</td>
|
||||
<td>$86.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shad Decker</td>
|
||||
@@ -522,7 +525,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td>2008/11/13</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Bruce</td>
|
||||
@@ -530,7 +533,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td>2011/06/27</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Donna Snider</td>
|
||||
@@ -538,7 +541,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td>2011/01/25</td>
|
||||
<td>$112.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -553,62 +556,62 @@ $(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,]+$/.test( d ) ? 'numeric-comma' : null;
|
||||
return d === 'Low' || d === 'Medium' || d === 'High' ?
|
||||
'salary-grade' :
|
||||
null;
|
||||
}
|
||||
);
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
$('#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>
|
||||
<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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>
|
||||
@@ -631,17 +634,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -654,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 with column visibility</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>
|
||||
|
||||
@@ -675,14 +675,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -700,21 +701,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -745,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>
|
||||
|
||||
@@ -754,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>
|
||||
@@ -764,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<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 - Ordering plug-ins (no type detection)</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../media/css/jquery.dataTables.css">
|
||||
@@ -11,22 +12,27 @@
|
||||
<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/jquery-1.11.3.min.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">
|
||||
|
||||
|
||||
$.fn.dataTable.ext.type.order['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
$.fn.dataTable.ext.type.order['salary-grade-pre'] = function ( d ) {
|
||||
switch ( d ) {
|
||||
case 'Low': return 1;
|
||||
case 'Medium': return 2;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"type": "numeric-comma",
|
||||
"targets": 3
|
||||
"type": "salary-grade",
|
||||
"targets": -1
|
||||
} ]
|
||||
} );
|
||||
} );
|
||||
@@ -38,25 +44,21 @@ $(document).ready(function() {
|
||||
<body class="dt-example">
|
||||
<div class="container">
|
||||
<section>
|
||||
<h1>DataTables example <span>- Ordering plug-ins (no type detection)</span></h1>
|
||||
<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="Initialisation option">columns.type</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</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 a comma for a decimal place, as is often used in parts of
|
||||
Europe.</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%">
|
||||
@@ -89,7 +91,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>61</td>
|
||||
<td>2011/04/25</td>
|
||||
<td>$320.800,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Garrett Winters</td>
|
||||
@@ -97,7 +99,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>63</td>
|
||||
<td>2011/07/25</td>
|
||||
<td>$170.750,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Ashton Cox</td>
|
||||
@@ -105,7 +107,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>66</td>
|
||||
<td>2009/01/12</td>
|
||||
<td>$86.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cedric Kelly</td>
|
||||
@@ -113,7 +115,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2012/03/29</td>
|
||||
<td>$433.060,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Airi Satou</td>
|
||||
@@ -121,7 +123,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>33</td>
|
||||
<td>2008/11/28</td>
|
||||
<td>$162.700,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brielle Williamson</td>
|
||||
@@ -129,7 +131,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2012/12/02</td>
|
||||
<td>$372.000,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Herrod Chandler</td>
|
||||
@@ -137,7 +139,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>59</td>
|
||||
<td>2012/08/06</td>
|
||||
<td>$137.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rhona Davidson</td>
|
||||
@@ -145,7 +147,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>55</td>
|
||||
<td>2010/10/14</td>
|
||||
<td>$327.900,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Colleen Hurst</td>
|
||||
@@ -153,7 +155,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>39</td>
|
||||
<td>2009/09/15</td>
|
||||
<td>$205.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sonya Frost</td>
|
||||
@@ -161,7 +163,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>23</td>
|
||||
<td>2008/12/13</td>
|
||||
<td>$103.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jena Gaines</td>
|
||||
@@ -169,7 +171,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>30</td>
|
||||
<td>2008/12/19</td>
|
||||
<td>$90.560,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Quinn Flynn</td>
|
||||
@@ -177,7 +179,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>22</td>
|
||||
<td>2013/03/03</td>
|
||||
<td>$342.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Charde Marshall</td>
|
||||
@@ -185,7 +187,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>36</td>
|
||||
<td>2008/10/16</td>
|
||||
<td>$470.600,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Haley Kennedy</td>
|
||||
@@ -193,7 +195,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>43</td>
|
||||
<td>2012/12/18</td>
|
||||
<td>$313.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tatyana Fitzpatrick</td>
|
||||
@@ -201,7 +203,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>19</td>
|
||||
<td>2010/03/17</td>
|
||||
<td>$385.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Silva</td>
|
||||
@@ -209,7 +211,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>66</td>
|
||||
<td>2012/11/27</td>
|
||||
<td>$198.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Paul Byrd</td>
|
||||
@@ -217,7 +219,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>64</td>
|
||||
<td>2010/06/09</td>
|
||||
<td>$725.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gloria Little</td>
|
||||
@@ -225,7 +227,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>59</td>
|
||||
<td>2009/04/10</td>
|
||||
<td>$237.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bradley Greer</td>
|
||||
@@ -233,7 +235,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>41</td>
|
||||
<td>2012/10/13</td>
|
||||
<td>$132.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dai Rios</td>
|
||||
@@ -241,7 +243,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>35</td>
|
||||
<td>2012/09/26</td>
|
||||
<td>$217.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jenette Caldwell</td>
|
||||
@@ -249,7 +251,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>30</td>
|
||||
<td>2011/09/03</td>
|
||||
<td>$345.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Yuri Berry</td>
|
||||
@@ -257,7 +259,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>40</td>
|
||||
<td>2009/06/25</td>
|
||||
<td>$675.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Caesar Vance</td>
|
||||
@@ -265,7 +267,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>21</td>
|
||||
<td>2011/12/12</td>
|
||||
<td>$106.450,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Doris Wilder</td>
|
||||
@@ -273,7 +275,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>23</td>
|
||||
<td>2010/09/20</td>
|
||||
<td>$85.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Angelica Ramos</td>
|
||||
@@ -281,7 +283,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2009/10/09</td>
|
||||
<td>$1.200.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Joyce</td>
|
||||
@@ -289,7 +291,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>42</td>
|
||||
<td>2010/12/22</td>
|
||||
<td>$92.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Chang</td>
|
||||
@@ -297,7 +299,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>28</td>
|
||||
<td>2010/11/14</td>
|
||||
<td>$357.650,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Brenden Wagner</td>
|
||||
@@ -305,7 +307,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>28</td>
|
||||
<td>2011/06/07</td>
|
||||
<td>$206.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fiona Green</td>
|
||||
@@ -313,7 +315,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>48</td>
|
||||
<td>2010/03/11</td>
|
||||
<td>$850.000,00</td>
|
||||
<td>High</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shou Itou</td>
|
||||
@@ -321,7 +323,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>20</td>
|
||||
<td>2011/08/14</td>
|
||||
<td>$163.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michelle House</td>
|
||||
@@ -329,7 +331,7 @@ $(document).ready(function() {
|
||||
<td>Sidney</td>
|
||||
<td>37</td>
|
||||
<td>2011/06/02</td>
|
||||
<td>$95.400,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Suki Burks</td>
|
||||
@@ -337,7 +339,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>53</td>
|
||||
<td>2009/10/22</td>
|
||||
<td>$114.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Prescott Bartlett</td>
|
||||
@@ -345,7 +347,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>27</td>
|
||||
<td>2011/05/07</td>
|
||||
<td>$145.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gavin Cortez</td>
|
||||
@@ -353,7 +355,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>22</td>
|
||||
<td>2008/10/26</td>
|
||||
<td>$235.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Martena Mccray</td>
|
||||
@@ -361,7 +363,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>46</td>
|
||||
<td>2011/03/09</td>
|
||||
<td>$324.050,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Unity Butler</td>
|
||||
@@ -369,7 +371,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/12/09</td>
|
||||
<td>$85.675,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Howard Hatfield</td>
|
||||
@@ -377,7 +379,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>51</td>
|
||||
<td>2008/12/16</td>
|
||||
<td>$164.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hope Fuentes</td>
|
||||
@@ -385,7 +387,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>41</td>
|
||||
<td>2010/02/12</td>
|
||||
<td>$109.850,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vivian Harrell</td>
|
||||
@@ -393,7 +395,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>62</td>
|
||||
<td>2009/02/14</td>
|
||||
<td>$452.500,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Timothy Mooney</td>
|
||||
@@ -401,7 +403,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>37</td>
|
||||
<td>2008/12/11</td>
|
||||
<td>$136.200,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jackson Bradshaw</td>
|
||||
@@ -409,7 +411,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>65</td>
|
||||
<td>2008/09/26</td>
|
||||
<td>$645.750,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Olivia Liang</td>
|
||||
@@ -417,7 +419,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2011/02/03</td>
|
||||
<td>$234.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bruno Nash</td>
|
||||
@@ -425,7 +427,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>38</td>
|
||||
<td>2011/05/03</td>
|
||||
<td>$163.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sakura Yamamoto</td>
|
||||
@@ -433,7 +435,7 @@ $(document).ready(function() {
|
||||
<td>Tokyo</td>
|
||||
<td>37</td>
|
||||
<td>2009/08/19</td>
|
||||
<td>$139.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Thor Walton</td>
|
||||
@@ -441,7 +443,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>61</td>
|
||||
<td>2013/08/11</td>
|
||||
<td>$98.540,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Finn Camacho</td>
|
||||
@@ -449,7 +451,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>47</td>
|
||||
<td>2009/07/07</td>
|
||||
<td>$87.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Serge Baldwin</td>
|
||||
@@ -457,7 +459,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>64</td>
|
||||
<td>2012/04/09</td>
|
||||
<td>$138.575,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zenaida Frank</td>
|
||||
@@ -465,7 +467,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>63</td>
|
||||
<td>2010/01/04</td>
|
||||
<td>$125.250,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zorita Serrano</td>
|
||||
@@ -473,7 +475,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>56</td>
|
||||
<td>2012/06/01</td>
|
||||
<td>$115.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jennifer Acosta</td>
|
||||
@@ -481,7 +483,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>43</td>
|
||||
<td>2013/02/01</td>
|
||||
<td>$75.650,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cara Stevens</td>
|
||||
@@ -489,7 +491,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>46</td>
|
||||
<td>2011/12/06</td>
|
||||
<td>$145.600,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hermione Butler</td>
|
||||
@@ -497,7 +499,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>47</td>
|
||||
<td>2011/03/21</td>
|
||||
<td>$356.250,00</td>
|
||||
<td>Medium</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Lael Greer</td>
|
||||
@@ -505,7 +507,7 @@ $(document).ready(function() {
|
||||
<td>London</td>
|
||||
<td>21</td>
|
||||
<td>2009/02/27</td>
|
||||
<td>$103.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jonas Alexander</td>
|
||||
@@ -513,7 +515,7 @@ $(document).ready(function() {
|
||||
<td>San Francisco</td>
|
||||
<td>30</td>
|
||||
<td>2010/07/14</td>
|
||||
<td>$86.500,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Shad Decker</td>
|
||||
@@ -521,7 +523,7 @@ $(document).ready(function() {
|
||||
<td>Edinburgh</td>
|
||||
<td>51</td>
|
||||
<td>2008/11/13</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Bruce</td>
|
||||
@@ -529,7 +531,7 @@ $(document).ready(function() {
|
||||
<td>Singapore</td>
|
||||
<td>29</td>
|
||||
<td>2011/06/27</td>
|
||||
<td>$183.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Donna Snider</td>
|
||||
@@ -537,7 +539,7 @@ $(document).ready(function() {
|
||||
<td>New York</td>
|
||||
<td>27</td>
|
||||
<td>2011/01/25</td>
|
||||
<td>$112.000,00</td>
|
||||
<td>Low</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -552,60 +554,58 @@ $(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['numeric-comma-pre'] = function ( d ) {
|
||||
return parseFloat( d.replace(/,/g, '.') ) || 0;
|
||||
<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;
|
||||
case 'High': return 3;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
$('#example').DataTable( {
|
||||
"columnDefs": [ {
|
||||
"type": "numeric-comma",
|
||||
"targets": 3
|
||||
"type": "salary-grade",
|
||||
"targets": -1
|
||||
} ]
|
||||
} );
|
||||
} );</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/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.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=
|
||||
"../../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,17 +628,15 @@ $(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>
|
||||
<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_y_dynamic.html">Scroll - vertical, dynamic height</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>
|
||||
@@ -651,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 with column visibility</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>
|
||||
|
||||
@@ -672,14 +669,15 @@ $(document).ready(function() {
|
||||
<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/row-border.html">Base style - row borders</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/jqueryUI.html">jQuery UI ThemeRoller</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>
|
||||
|
||||
@@ -697,21 +695,18 @@ $(document).ready(function() {
|
||||
<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 filtering (text inputs)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (select
|
||||
inputs)</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/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>
|
||||
<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">Filtering API (regular expressions)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">Scrolling and Bootstrap tabs</a></li>
|
||||
<li><a href="../api/regex.html">Search API (regular expressions)</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -742,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>
|
||||
|
||||
@@ -752,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>
|
||||
@@ -761,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/extensions">extensions</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> © 2007-2014<br>
|
||||
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
|
||||
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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="#">← '+oLang.sPrevious+'</a></li>'+
|
||||
'<li class="next disabled"><a href="#">'+oLang.sNext+' → </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"
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -1,39 +1,36 @@
|
||||
|
||||
@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 {
|
||||
width: 980px;
|
||||
max-width: 980px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
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;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
font-size: 0.5em;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
a {
|
||||
@@ -42,7 +39,7 @@ a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
p > a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@@ -126,7 +123,7 @@ div.footer {
|
||||
}
|
||||
|
||||
div.footer > div.liner {
|
||||
width: 960px;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -184,54 +181,103 @@ code {
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
code:after {
|
||||
display: inline-block;
|
||||
border-left: 1px solid rgba( 0, 0, 0, 0.2 );
|
||||
margin-left: 4px;
|
||||
padding-left: 4px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
a code {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
code.option {
|
||||
color: #D14; /* red */
|
||||
background-color: #fcf6f8;
|
||||
border: 1px solid #f7d6df;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.option:after { content: 'Option'; }
|
||||
|
||||
code.path {
|
||||
color: #095c05; /* dark green */
|
||||
border: 1px solid #D6E9C6;
|
||||
background-color: #eef7ed;
|
||||
border: 1px solid #8ccb89;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.path:after { content: 'Path'; }
|
||||
|
||||
code.tag {
|
||||
color: #cad119; /* yellow */
|
||||
background-color: #f7f8e6;
|
||||
border: 1px solid #D6E9C6;
|
||||
color: #c29f00; /* yellow */
|
||||
background-color: #fff9d7;
|
||||
border: 1px solid #ffe700;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.tag:after { content: 'Tag'; }
|
||||
|
||||
code.api {
|
||||
color: #0c199c; /* dark blue */
|
||||
background-color: #f4f5fc;
|
||||
border: 1px solid #c6cbe9;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.api:after { content: 'API'; }
|
||||
|
||||
code.type {
|
||||
color: #d119cf; /* purple */
|
||||
color: #d119cf; /* pink */
|
||||
background-color: #faebfa;
|
||||
border: 1px solid #f3aef2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.type:after { content: 'Type'; }
|
||||
|
||||
code.event {
|
||||
color: #2a839e; /* deep aqua */
|
||||
background-color: #f5fafb;
|
||||
border: 1px solid #a8ddec;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.event:after { content: 'Event'; }
|
||||
|
||||
code.string {
|
||||
color: #e8941e; /* orange */
|
||||
background-color: #fcf8f1;
|
||||
border: 1px solid #f7e4c9;
|
||||
color: #c05f1d; /* brown */
|
||||
background-color: #f5eee9;
|
||||
border: 1px solid #dfc4b2;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.string:after { content: 'String'; }
|
||||
|
||||
code.field {
|
||||
color: #ad1ee8; /* purple */
|
||||
background-color: #f9f1fc;
|
||||
border: 1px solid #ebc9f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.field:after { content: 'Field'; }
|
||||
|
||||
code.button {
|
||||
color: #464e50; /* grey */
|
||||
background-color: #f2f7f9;
|
||||
border: 1px solid #b8c3c5;
|
||||
white-space: nowrap;
|
||||
}
|
||||
code.button:after { content: 'Button'; }
|
||||
|
||||
code.multiline {
|
||||
display: inline-block;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
div.syntaxhighlighter code:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
ul.tabs {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
height: 40px;
|
||||
margin: 20px 20px 0 0;
|
||||
}
|
||||
@@ -240,7 +286,7 @@ ul.tabs {
|
||||
ul.tabs li {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 0 20px;
|
||||
padding: 0 15px;
|
||||
height: 40px;
|
||||
font-size: 1.2em;
|
||||
margin: 0 5px;
|
||||
@@ -268,10 +314,14 @@ ul.tabs li.active:hover {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
div.tabs {
|
||||
clear: both;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
div.tabs>div {
|
||||
padding: 0 20px;
|
||||
padding: 15px;
|
||||
border: 1px solid #ccc;
|
||||
margin-top: 1px;
|
||||
display: none;
|
||||
border-radius: 5px;
|
||||
box-shadow: 2px 2px 2px #bbb;
|
||||
@@ -282,8 +332,45 @@ div.tabs>div h1 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
div.tabs > div > p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div.column_half {
|
||||
float: left;
|
||||
width: 49%;
|
||||
padding-right: 1%;
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width : 979px) {
|
||||
div.container,
|
||||
div.footer {
|
||||
padding: 0 1em;
|
||||
}
|
||||
}
|
||||
|
||||
@media
|
||||
screen and (max-width : 767px),
|
||||
screen and (max-width : 768px) and (orientation: portrait) {
|
||||
div.info {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
-ms-column-count: 1;
|
||||
-o-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
-webkit-column-count: 1;
|
||||
-moz-column-count: 1;
|
||||
-ms-column-count: 1;
|
||||
-o-column-count: 1;
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
h1 span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,115 +2,129 @@
|
||||
/*global SyntaxHighlighter*/
|
||||
SyntaxHighlighter.config.tagName = 'code';
|
||||
|
||||
$(document).ready( function () {
|
||||
if ( ! $.fn.dataTable ) {
|
||||
return;
|
||||
}
|
||||
var dt110 = $.fn.dataTable.Api ? true : false;
|
||||
if ( window.$ ) {
|
||||
$(document).ready( function () {
|
||||
if ( ! $.fn.dataTable ) {
|
||||
return;
|
||||
}
|
||||
var dt110 = $.fn.dataTable.Api ? true : false;
|
||||
|
||||
// Work around for WebKit bug 55740
|
||||
var info = $('div.info');
|
||||
// Work around for WebKit bug 55740
|
||||
var info = $('div.info');
|
||||
|
||||
if ( info.height() < 115 ) {
|
||||
info.css( 'height', '8em' );
|
||||
}
|
||||
if ( info.height() < 115 ) {
|
||||
info.css( 'min-height', '8em' );
|
||||
}
|
||||
|
||||
var escapeHtml = function ( str ) {
|
||||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
};
|
||||
var escapeHtml = function ( str ) {
|
||||
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
};
|
||||
|
||||
// css
|
||||
var cssContainer = $('div.tabs div.css');
|
||||
if ( $.trim( cssContainer.find('code').text() ) === '' ) {
|
||||
cssContainer.find('code, p:eq(0), div').css('display', 'none');
|
||||
}
|
||||
// css
|
||||
var cssContainer = $('div.tabs div.css');
|
||||
if ( $.trim( cssContainer.find('code').text() ) === '' ) {
|
||||
cssContainer.find('code, p:eq(0), div').css('display', 'none');
|
||||
}
|
||||
|
||||
// init html
|
||||
var table = $('<p/>').append( $('table').clone() ).html();
|
||||
$('div.tabs div.table').append(
|
||||
'<code class="multiline brush: html;">\t\t\t'+
|
||||
escapeHtml( table )+
|
||||
'</code>'
|
||||
);
|
||||
//SyntaxHighlighter.highlight({}, $('#display-init-html')[0]);
|
||||
// init html
|
||||
var table = $('<p/>').append( $('table').clone() ).html();
|
||||
$('div.tabs div.table').append(
|
||||
'<code class="multiline language-html">\t\t\t'+
|
||||
escapeHtml( table )+
|
||||
'</code>'
|
||||
);
|
||||
//SyntaxHighlighter.highlight({}, $('#display-init-html')[0]);
|
||||
|
||||
// Allow the demo code to run if DT 1.9 is used
|
||||
if ( dt110 ) {
|
||||
// json
|
||||
var ajaxTab = $('ul.tabs li').eq(3).css('display', 'none');
|
||||
// Allow the demo code to run if DT 1.9 is used
|
||||
if ( dt110 ) {
|
||||
// json
|
||||
var ajaxTab = $('ul.tabs li').eq(3).css('display', 'none');
|
||||
|
||||
$(document).on( 'init.dt', function ( e, settings ) {
|
||||
var api = new $.fn.dataTable.Api( settings );
|
||||
|
||||
var show = function ( str ) {
|
||||
ajaxTab.css( 'display', 'block' );
|
||||
$('div.tabs div.ajax code').remove();
|
||||
|
||||
// Old IE :-|
|
||||
try {
|
||||
str = JSON.stringify( str, null, 2 );
|
||||
} catch ( e ) {}
|
||||
|
||||
$('div.tabs div.ajax').append(
|
||||
'<code class="multiline brush: js;">'+str+'</code>'
|
||||
);
|
||||
SyntaxHighlighter.highlight( {}, $('div.tabs div.ajax code')[0] );
|
||||
};
|
||||
|
||||
// First draw
|
||||
var json = api.ajax.json();
|
||||
if ( json ) {
|
||||
show( json );
|
||||
}
|
||||
|
||||
// Subsequent draws
|
||||
api.on( 'xhr.dt', function ( e, settings, json ) {
|
||||
show( json );
|
||||
} );
|
||||
} );
|
||||
|
||||
// php
|
||||
var phpTab = $('ul.tabs li').eq(4).css('display', 'none');
|
||||
|
||||
$(document).on( 'init.dt.demoSSP', function ( e, settings ) {
|
||||
if ( settings.oFeatures.bServerSide ) {
|
||||
if ( $.isFunction( settings.ajax ) ) {
|
||||
$(document).on( 'init.dt', function ( e, settings ) {
|
||||
if ( e.namespace !== 'dt' ) {
|
||||
return;
|
||||
}
|
||||
$.ajax( {
|
||||
url: '../resources/examples.php',
|
||||
data: {
|
||||
src: settings.sAjaxSource || settings.ajax.url || settings.ajax
|
||||
},
|
||||
dataType: 'text',
|
||||
type: 'post',
|
||||
success: function ( txt ) {
|
||||
phpTab.css( 'display', 'block' );
|
||||
$('div.tabs div.php').append(
|
||||
'<code class="multiline brush: php;">'+txt+'</code>'
|
||||
);
|
||||
SyntaxHighlighter.highlight( {}, $('div.tabs div.php code')[0] );
|
||||
}
|
||||
|
||||
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 {
|
||||
str = JSON.stringify( str, null, 2 );
|
||||
} catch ( e ) {}
|
||||
|
||||
$('div.tabs div.ajax').append(
|
||||
'<code class="multiline language-js">'+str+'</code>'
|
||||
);
|
||||
|
||||
// This can be really slow for large builds
|
||||
setTimeout( function () {
|
||||
SyntaxHighlighter.highlight( {}, $('div.tabs div.ajax code')[0] );
|
||||
}, 500 );
|
||||
};
|
||||
|
||||
// First draw
|
||||
var json = api.ajax.json();
|
||||
if ( json ) {
|
||||
show( json );
|
||||
}
|
||||
|
||||
// Subsequent draws
|
||||
api.on( 'xhr.dt', function ( e, settings, json ) {
|
||||
show( json );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
// php
|
||||
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;
|
||||
}
|
||||
$.ajax( {
|
||||
url: '../resources/examples.php',
|
||||
data: {
|
||||
src: settings.sAjaxSource || settings.ajax.url || settings.ajax
|
||||
},
|
||||
dataType: 'text',
|
||||
type: 'post',
|
||||
success: function ( txt ) {
|
||||
phpTab.css( 'display', 'block' );
|
||||
$('div.tabs div.php').append(
|
||||
'<code class="multiline language-php">'+txt+'</code>'
|
||||
);
|
||||
SyntaxHighlighter.highlight( {}, $('div.tabs div.php code')[0] );
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}
|
||||
else {
|
||||
$('ul.tabs li').eq(3).css('display', 'none');
|
||||
$('ul.tabs li').eq(4).css('display', 'none');
|
||||
}
|
||||
|
||||
// Tabs
|
||||
$('ul.tabs').on( 'click', 'li', function () {
|
||||
$('ul.tabs li.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
$('div.tabs>div')
|
||||
.css('display', 'none')
|
||||
.eq( $(this).index() ).css('display', 'block');
|
||||
} );
|
||||
}
|
||||
else {
|
||||
$('ul.tabs li').eq(3).css('display', 'none');
|
||||
$('ul.tabs li').eq(4).css('display', 'none');
|
||||
}
|
||||
|
||||
// Tabs
|
||||
$('ul.tabs').on( 'click', 'li', function () {
|
||||
$('ul.tabs li.active').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
$('div.tabs>div')
|
||||
.css('display', 'none')
|
||||
.eq( $(this).index() ).css('display', 'block');
|
||||
$('ul.tabs li.active').click();
|
||||
} );
|
||||
$('ul.tabs li.active').click();
|
||||
} );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 841 B After Width: | Height: | Size: 686 B |
|
Before Width: | Height: | Size: 881 B After Width: | Height: | Size: 709 B |
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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="">«</a></li>'+
|
||||
'<li class="next arrow unavailable"><a href="">»</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? '…' : 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"
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |