Compare commits
186 Commits
RELEASE_1_
...
1_9_DEV
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9dc3f98e3d | ||
|
|
4f4981535e | ||
|
|
8e224fec14 | ||
|
|
fbc0877c94 | ||
|
|
82e52fdce1 | ||
|
|
771df2ac2d | ||
|
|
e8fb40640e | ||
|
|
478d7f4de6 | ||
|
|
6d0d1100f2 | ||
|
|
65f34e23f3 | ||
|
|
699dabeec8 | ||
|
|
9720130cbc | ||
|
|
aa39fc2b96 | ||
|
|
91858f9e86 | ||
|
|
8714f7cc0e | ||
|
|
f1a74f3c25 | ||
|
|
cf0bfe0145 | ||
|
|
f4ff79bfba | ||
|
|
4bfe3d7c89 | ||
|
|
9ebabaf089 | ||
|
|
5088e48b80 | ||
|
|
5a506746bb | ||
|
|
22bffbb014 | ||
|
|
f547513227 | ||
|
|
e1d860205b | ||
|
|
c44e10cf98 | ||
|
|
6db08eb107 | ||
|
|
7189aec651 | ||
|
|
356579f311 | ||
|
|
473fc847b2 | ||
|
|
e596de697a | ||
|
|
bebc9e516d | ||
|
|
b235c64c2a | ||
|
|
27488c4093 | ||
|
|
1c60542040 | ||
|
|
64a1b6b032 | ||
|
|
b3e57df2ef | ||
|
|
013eac9d0b | ||
|
|
2bc7cd34c9 | ||
|
|
57cc9f1b2c | ||
|
|
c8c40189a2 | ||
|
|
169eb721d2 | ||
|
|
bec6085880 | ||
|
|
3191ee098b | ||
|
|
4e8f0fadd9 | ||
|
|
d7d3aeddea | ||
|
|
88b2990e53 | ||
|
|
9a94759fa4 | ||
|
|
a41a68d91d | ||
|
|
d9e02ab5c8 | ||
|
|
e5816e381c | ||
|
|
0d772b5eba | ||
|
|
d0458ca22c | ||
|
|
8eb722271e | ||
|
|
224b3b0661 | ||
|
|
23993219d7 | ||
|
|
e2ac47b675 | ||
|
|
d4366df398 | ||
|
|
1550b37c79 | ||
|
|
7a42b450db | ||
|
|
f535031e41 | ||
|
|
66a2e3d659 | ||
|
|
d210865c83 | ||
|
|
bfd625350c | ||
|
|
d8132799f7 | ||
|
|
486315a25c | ||
|
|
c5172dc920 | ||
|
|
a22727c84b | ||
|
|
923c640298 | ||
|
|
7d2d62d519 | ||
|
|
bccc85ef9f | ||
|
|
7adcf877c0 | ||
|
|
d6d24275df | ||
|
|
a264ca66e9 | ||
|
|
b0d5255de9 | ||
|
|
b4a289bf36 | ||
|
|
c6d1dfd929 | ||
|
|
8795d97194 | ||
|
|
07c3d3f5a6 | ||
|
|
77c551268e | ||
|
|
5f53331cd6 | ||
|
|
25fadbc644 | ||
|
|
6c923e4953 | ||
|
|
30e018f398 | ||
|
|
2928326042 | ||
|
|
9dc702329d | ||
|
|
6a7a7151b8 | ||
|
|
94539913a5 | ||
|
|
6610ec24b8 | ||
|
|
e1fb1748a8 | ||
|
|
6205de54a4 | ||
|
|
b135e9b676 | ||
|
|
b4ff3dda3c | ||
|
|
e4cc6aa853 | ||
|
|
ee47cb7518 | ||
|
|
e5b826c434 | ||
|
|
e86da5d30a | ||
|
|
b53de6fc77 | ||
|
|
c491f8a37f | ||
|
|
aeedb9afdc | ||
|
|
5c67be62ae | ||
|
|
3ddd89b52e | ||
|
|
133e7fb7fe | ||
|
|
2b673956d2 | ||
|
|
b6e60beef5 | ||
|
|
eb6bde7e08 | ||
|
|
d5e5d31725 | ||
|
|
cc265bcb09 | ||
|
|
dcf88a2609 | ||
|
|
d20b87f885 | ||
|
|
4853e868d4 | ||
|
|
626492b81c | ||
|
|
1f02ac87fc | ||
|
|
2c14233057 | ||
|
|
a1b33880c6 | ||
|
|
edabb3febe | ||
|
|
967e1419c1 | ||
|
|
4c48650a25 | ||
|
|
30a437d80e | ||
|
|
42567c9968 | ||
|
|
58f85fc601 | ||
|
|
9639d4f485 | ||
|
|
af16d8016c | ||
|
|
5adb634a25 | ||
|
|
5732f4c1fa | ||
|
|
f46a49f7f4 | ||
|
|
8d595eff37 | ||
|
|
9b0bc1bbf9 | ||
|
|
49a2c1d427 | ||
|
|
b68073b911 | ||
|
|
1ae7f81a11 | ||
|
|
841480fa59 | ||
|
|
4b1b4626a5 | ||
|
|
ba02adc6e9 | ||
|
|
1d8deed379 | ||
|
|
f9f6031321 | ||
|
|
896a8dc0fc | ||
|
|
7e9d5eb537 | ||
|
|
efa3209654 | ||
|
|
f175f3658e | ||
|
|
437ac29048 | ||
|
|
c655c92cfe | ||
|
|
5f82b240bc | ||
|
|
1d2db4d5e9 | ||
|
|
e32312be0b | ||
|
|
22cb3edef7 | ||
|
|
8a8ca1e7b8 | ||
|
|
31ccd959bc | ||
|
|
5131e1dd7f | ||
|
|
856bef205d | ||
|
|
4c501bd2d8 | ||
|
|
826545f1e5 | ||
|
|
8fd5311d9e | ||
|
|
ad104832d8 | ||
|
|
a444026985 | ||
|
|
f788dd28d3 | ||
|
|
9f171bbd7e | ||
|
|
922e1ddc8b | ||
|
|
505335b796 | ||
|
|
0c296ca76e | ||
|
|
4708870aa0 | ||
|
|
e87798781b | ||
|
|
b93d6bc243 | ||
|
|
deae02b9d0 | ||
|
|
6dc4630866 | ||
|
|
8a7c5c938e | ||
|
|
9a1fddf79b | ||
|
|
127339549e | ||
|
|
88932adb92 | ||
|
|
1c8f1e3465 | ||
|
|
93afeb100f | ||
|
|
0843c71f7d | ||
|
|
1bf42d2ca9 | ||
|
|
61f05f8da7 | ||
|
|
b61466cca4 | ||
|
|
0dc53f04b7 | ||
|
|
2995d43da4 | ||
|
|
f9f5743665 | ||
|
|
cf0611258f | ||
|
|
98737aaeb7 | ||
|
|
0e46abde6c | ||
|
|
02bfc4023d | ||
|
|
2c9ce2aa59 | ||
|
|
38cf5b6928 | ||
|
|
2db0cb398f | ||
|
|
e34f232f86 |
2
.gitignore
vendored
@@ -1 +1,3 @@
|
||||
extras
|
||||
docs
|
||||
.DS_Store
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This DataTables plugin (v1.8.x) for jQuery was developed out of the desire to allow highly configurable access to HTML tables with advanced access features.
|
||||
This DataTables plugin (v1.9.x) for jQuery was developed out of the desire to allow highly configurable access to HTML tables with advanced access features.
|
||||
|
||||
For detailed installation, usage and API instructions, please refer to the DataTables web-pages: http://www.datatables.net
|
||||
|
||||
@@ -6,6 +6,6 @@ Questions, feature requests and bug reports (etc) can all be asked on the DataTa
|
||||
|
||||
The DataTables source can be found in the media/js/ directory of this archive.
|
||||
|
||||
DataTables is released with dual licensing, using the GPL v2 (license-gpl2.txt) and an BSD style license (license-bsd.txt). Please see the corresponding license file for details of these licenses. You are free to use, modify and distribute this software, but all copyright information must remain.
|
||||
DataTables is released with dual licensing, using the GPL v2 (license-gpl2.txt) and an BSD style license (license-bsd.txt). You may select which of the two licenses you wish to use DataTables under. Please see the corresponding license file for details of these licenses. You are free to use, modify and distribute this software, but all copyright information must remain.
|
||||
|
||||
If you discover any bugs in DataTables, have any suggestions for improvements or even if you just like using it, please free to get in touch with me: www.datatables.net/contact
|
||||
@@ -465,7 +465,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{
|
||||
@@ -479,6 +479,10 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -493,6 +497,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -511,7 +516,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -525,6 +530,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -468,13 +468,18 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{ "bVisible": false, "aTargets": [2] }
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -489,6 +494,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -507,7 +513,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -521,6 +527,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
611
examples/advanced_init/defaults.html
Normal file
@@ -0,0 +1,611 @@
|
||||
<!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" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../media/css/demo_page.css";
|
||||
@import "../../media/css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
$.extend( $.fn.dataTable.defaults, {
|
||||
"bFilter": false,
|
||||
"bSort": false
|
||||
} );
|
||||
|
||||
$('#example').dataTable();
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container">
|
||||
<div class="full_width big">
|
||||
DataTables - setting defaults example
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<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 <i>sDom</i> to a common value so all tables get the same layout). This can be done using the <i>$.fn.dataTable.defaults</i> object. This object will take all 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 filtering and sorting features of DataTables being disabled by default, which is reflected in the table when it is initialised, as can be seen below.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" 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>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$.extend( $.fn.dataTable.defaults, {
|
||||
"bFilter": false,
|
||||
"bSort": false
|
||||
} );
|
||||
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
<div class="demo_links">
|
||||
<h2>Basic initialisation</h2>
|
||||
<ul>
|
||||
<li><a href="../basic_init/zero_config.html">Zero configuration</a></li>
|
||||
<li><a href="../basic_init/filter_only.html">Feature enablement</a></li>
|
||||
<li><a href="../basic_init/table_sorting.html">Sorting data</a></li>
|
||||
<li><a href="../basic_init/multi_col_sort.html">Multi-column sorting</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 - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
<a href="../basic_init/scroll_x.html">Horizontal</a> /
|
||||
<a href="../basic_init/scroll_y.html">Vertical</a> /
|
||||
<a href="../basic_init/scroll_xy.html">Both</a> /
|
||||
<a href="../basic_init/scroll_y_theme.html">Themed</a> /
|
||||
<a href="../basic_init/scroll_y_infinite.html">Infinite</a>
|
||||
</li>
|
||||
<li><a href="../basic_init/language.html">Change language information (internationalisation)</a></li>
|
||||
<li><a href="../basic_init/themes.html">ThemeRoller themes (Smoothness)</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Advanced initialisation</h2>
|
||||
<ul>
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table controls (sDom)</a></li>
|
||||
<li><a href="../advanced_init/length_menu.html">Defining length menu options</a></li>
|
||||
<li><a href="../advanced_init/complex_header.html">Complex headers and hidden columns</a></li>
|
||||
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar (element) around table</a></li>
|
||||
<li><a href="../advanced_init/highlight.html">Row highlighting with CSS</a></li>
|
||||
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
|
||||
<li><a href="../advanced_init/row_callback.html">Row callback</a></li>
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
<ul>
|
||||
<li><a href="../api/add_row.html">Dynamically add a new row</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (using "input" elements)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (using "select" elements)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlight rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Show and hide details about a particular record</a></li>
|
||||
<li><a href="../api/select_row.html">User selectable rows (multiple rows)</a></li>
|
||||
<li><a href="../api/select_single_row.html">User selectable rows (single row) and delete rows</a></li>
|
||||
<li><a href="../api/editable.html">Editable rows (with jEditable)</a></li>
|
||||
<li><a href="../api/form.html">Submit form with elements in table</a></li>
|
||||
<li><a href="../api/counter_column.html">Index column (static number column)</a></li>
|
||||
<li><a href="../api/show_hide.html">Show and hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">API function use in initialisation object (callback)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">DataTables scrolling and tabs</a></li>
|
||||
<li><a href="../api/regex.html">Regular expression filtering</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="demo_links">
|
||||
<h2>Data sources</h2>
|
||||
<ul>
|
||||
<li><a href="../data_sources/dom.html">DOM</a></li>
|
||||
<li><a href="../data_sources/js_array.html">Javascript array</a></li>
|
||||
<li><a href="../data_sources/ajax.html">Ajax source</a></li>
|
||||
<li><a href="../data_sources/server_side.html">Server side processing</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Server-side processing</h2>
|
||||
<ul>
|
||||
<li><a href="../server_side/server_side.html">Obtain server-side data</a></li>
|
||||
<li><a href="../server_side/custom_vars.html">Add extra HTTP variables</a></li>
|
||||
<li><a href="../server_side/post.html">Use HTTP POST</a></li>
|
||||
<li><a href="../server_side/ids.html">Automatic addition of IDs and classes to rows</a></li>
|
||||
<li><a href="../server_side/object_data.html">Reading table data from objects</a></li>
|
||||
<li><a href="../server_side/row_details.html">Show and hide details about a particular record</a></li>
|
||||
<li><a href="../server_side/select_rows.html">User selectable rows (multiple rows)</a></li>
|
||||
<li><a href="../server_side/jsonp.html">JSONP for a cross domain data source</a></li>
|
||||
<li><a href="../server_side/editable.html">jEditable integration with DataTables</a></li>
|
||||
<li><a href="../server_side/defer_loading.html">Deferred loading of Ajax data</a></li>
|
||||
<li><a href="../server_side/column_ordering.html">Custom column ordering (in callback data)</a></li>
|
||||
<li><a href="../server_side/pipeline.html">Pipelining data (reduce Ajax calls for paging)</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Ajax data source</h2>
|
||||
<ul>
|
||||
<li><a href="../ajax/ajax.html">Ajax sourced data (array of arrays)</a></li>
|
||||
<li><a href="../ajax/objects.html">Ajax sourced data (array of objects)</a></li>
|
||||
<li><a href="../ajax/defer_render.html">Deferred DOM creation for extra speed</a></li>
|
||||
<li><a href="../ajax/null_data_source.html">Empty data source columns</a></li>
|
||||
<li><a href="../ajax/custom_data_property.html">Use a data source other than aaData (the default)</a></li>
|
||||
<li><a href="../ajax/objects_subarrays.html">Read column data from sub-arrays</a></li>
|
||||
<li><a href="../ajax/deep.html">Read column data from deeply nested properties</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Plug-ins</h2>
|
||||
<ul>
|
||||
<li><a href="../plug-ins/plugin_api.html">Add custom API functions</a></li>
|
||||
<li><a href="../plug-ins/sorting_plugin.html">Sorting and automatic type detection</a></li>
|
||||
<li><a href="../plug-ins/sorting_sType.html">Sorting without automatic type detection</a></li>
|
||||
<li><a href="../plug-ins/paging_plugin.html">Custom pagination controls</a></li>
|
||||
<li><a href="../plug-ins/range_filtering.html">Range filtering / custom filtering</a></li>
|
||||
<li><a href="../plug-ins/dom_sort.html">Live DOM sorting</a></li>
|
||||
<li><a href="../plug-ins/html_sort.html">Automatic HTML type detection</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="footer" class="clear" style="text-align:center;">
|
||||
<p>
|
||||
Please refer to the <a href="http://www.datatables.net/usage">DataTables documentation</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>
|
||||
|
||||
<span style="font-size:10px;">
|
||||
DataTables designed and created by <a href="http://www.sprymedia.co.uk">Allan Jardine</a> © 2007-2011<br>
|
||||
DataTables is dual licensed under the <a href="http://www.datatables.net/license_gpl2">GPL v2 license</a> or a <a href="http://www.datatables.net/license_bsd">BSD (3-point) license</a>.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -467,11 +467,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sDom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>'
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -486,6 +490,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -504,7 +509,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -518,6 +523,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -471,12 +471,16 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sDom": '<"toolbar">frtip'
|
||||
} );
|
||||
$("div.toolbar").html('<b>Custom tool bar! Text/images etc.</b>');
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -491,6 +495,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -509,7 +514,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -523,6 +528,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -482,7 +482,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
/* Init DataTables */
|
||||
$('#example').dataTable();
|
||||
|
||||
@@ -505,6 +505,10 @@
|
||||
alert( sTitle )
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -519,6 +523,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -537,7 +542,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -551,6 +556,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
var oTable = $('#example').dataTable();
|
||||
|
||||
/* Apply the tooltips */
|
||||
$( oTable.fnGetNodes() ).tooltip( {
|
||||
oTable.$('tr').tooltip( {
|
||||
"delay": 0,
|
||||
"track": true,
|
||||
"fade": 250
|
||||
@@ -57,7 +57,8 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>Events which are assigned to the table elements are retained by DataTables such that they will still work as you would expect, even after changing the sort order etc. (no need to reapply the event handlers). You can do this at any time, although if you apply the handlers after the table has been initialised there is an extra set. Rather then queriing the DOM to get all rows (since they aren't there) you need to use the <b>fnGetNodes()</b> API function. This is shown in this example.</p>
|
||||
<p>Events which are assigned to the table elements are retained by DataTables such that they will still work as you would expect, even after changing the sort order etc. (no need to reapply the event handlers). You can do this at any time, although if you apply the handlers after the table has been initialised there is an extra set. Rather then querying the DOM to get all rows (since they aren't there) you can use the '$' API method that DataTables provides which does a jQuery selector on the whole table and returns a jQuery object.</p>
|
||||
<p>This example shows the tooltip plug-in being applied to the table after initialisation.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
@@ -493,7 +494,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
/*
|
||||
* First step is to create title attributes for the rows in the table
|
||||
* This isn't needed if the required 'title' attribute is already set in the HTML in the
|
||||
@@ -521,12 +522,16 @@
|
||||
var oTable = $('#example').dataTable();
|
||||
|
||||
/* Apply the tooltips */
|
||||
$( oTable.fnGetNodes() ).tooltip( {
|
||||
oTable.$('tr').tooltip( {
|
||||
"delay": 0,
|
||||
"track": true,
|
||||
"fade": 250
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -541,6 +546,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -559,7 +565,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -573,6 +579,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
/*
|
||||
* First step is to create title attributes for the rows in the table
|
||||
* This isn't needed if the required 'title' attribute is already set in the HTML in the
|
||||
@@ -527,6 +527,10 @@
|
||||
/* Init DataTables */
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -541,6 +545,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -559,7 +564,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -573,6 +578,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -484,7 +484,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
|
||||
/*
|
||||
@@ -511,6 +511,10 @@
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -525,6 +529,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -543,7 +548,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -557,6 +562,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -459,10 +459,13 @@
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<p>Javascript:</p>
|
||||
<pre>
|
||||
$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<p>CSS (note that for this example the selector ".ex_highlight" is used to limit the CSS here to just this example.</p>
|
||||
<pre>.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {
|
||||
@@ -519,6 +522,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -537,7 +541,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -551,6 +555,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -55,8 +55,13 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
$('#example').dataTable();</pre>
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -71,6 +76,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -89,7 +95,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -103,6 +109,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -462,13 +462,17 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"oLanguage": {
|
||||
"sUrl": "media/language/de_DE.txt"
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -483,6 +487,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -501,7 +506,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -515,6 +520,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -460,11 +460,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -479,6 +483,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -497,7 +502,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -511,6 +516,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -471,7 +471,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
|
||||
/* Append the grade to the default row class name */
|
||||
@@ -487,6 +487,10 @@
|
||||
} ]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -501,6 +505,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -519,7 +524,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -533,6 +538,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -486,7 +486,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
oTable = $('#example').dataTable({
|
||||
"fnDrawCallback": function ( oSettings ) {
|
||||
if ( oSettings.aiDisplay.length == 0 )
|
||||
@@ -522,6 +522,10 @@
|
||||
"sDom": 'lfr<"giveHeight"t>ip'
|
||||
});
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -536,6 +540,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -554,7 +559,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -568,6 +573,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aoColumns": [
|
||||
null,
|
||||
@@ -486,6 +486,10 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -500,6 +504,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -518,7 +523,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -532,6 +537,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -59,12 +59,20 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/arrays.txt"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -79,6 +87,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -97,7 +106,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -111,6 +120,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -60,13 +60,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/custom_prop.txt",
|
||||
"sAjaxDataProp": "demo"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -81,6 +89,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -99,7 +108,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -113,6 +122,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/deep.txt",
|
||||
@@ -79,6 +79,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -93,6 +101,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -111,7 +120,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -125,6 +134,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -60,13 +60,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/arrays.txt",
|
||||
"bDeferRender": true
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -81,6 +89,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -99,7 +108,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -113,6 +122,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/arrays.txt",
|
||||
@@ -71,6 +71,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -85,6 +93,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -103,7 +112,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -117,6 +126,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/objects.txt",
|
||||
@@ -79,6 +79,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -93,6 +101,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -111,7 +120,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -125,6 +134,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": "sources/objects_subarrays.txt",
|
||||
@@ -79,6 +79,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -93,6 +101,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -111,7 +120,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -125,6 +134,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Global var for counter */
|
||||
<pre class="brush: js;">/* Global var for counter */
|
||||
var giCount = 1;
|
||||
|
||||
$(document).ready(function() {
|
||||
@@ -82,6 +82,10 @@ function fnClickAddRow() {
|
||||
|
||||
giCount++;
|
||||
}</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -96,6 +100,7 @@ function fnClickAddRow() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -114,7 +119,7 @@ function fnClickAddRow() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -128,6 +133,7 @@ function fnClickAddRow() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -15,10 +15,8 @@
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"fnInitComplete": function () {
|
||||
var
|
||||
that = this,
|
||||
nTrs = this.fnGetNodes();
|
||||
$('td', nTrs).click( function () {
|
||||
var that = this;
|
||||
this.$('td').click( function () {
|
||||
that.fnFilter( this.innerHTML );
|
||||
} );
|
||||
}
|
||||
@@ -33,8 +31,8 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>There are times when you may wish to call API functions inside the DataTables callback functions (for example fnInitComplete, fnRowCallback etc). The complicating issue with this is that the object hasn't fully initialised, so you can't assign the result to something like oTable and then use oTable in the callback. However, this is catered for by the execution scope of the callback function. Here 'this' is the DataTables object that is created for the table.</p>
|
||||
<p>In this example you will be able to see that this.fnGetNodes() is used, and also the value of this stored in the variable 'that' so it can be used inside the jQuery click function, where the execution scope has been changed to the td element!). The action here is to apply the filter with the value of what is in each cell.</p>
|
||||
<p>There are times when you may wish to call API functions inside the DataTables callback functions (for example fnInitComplete, fnRowCallback etc). The complicating issue with this is that the object hasn't fully initialised, so you can't assign the result to something like oTable and then use oTable in the callback. However, this is catered for by the execution scope of the callback function. Here <i>this</i> is the DataTables object that is created for the table.</p>
|
||||
<p>In this example you will be able to see that <i>this.$()</i> is used to get all nodes in the table's body and then act on them (in this case added a click event). Note also the value of <i>this</i> stored in the variable <i>that</i> so it can be used inside the jQuery click function, where the execution scope has been changed to the td element!). The action here is to apply the filter with the value of what is in each cell.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
@@ -468,18 +466,20 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"fnInitComplete": function () {
|
||||
var
|
||||
that = this,
|
||||
nTrs = this.fnGetNodes();
|
||||
$('td', nTrs).click( function () {
|
||||
var that = this;
|
||||
this.$('td').click( function () {
|
||||
that.fnFilter( this.innerHTML );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -494,6 +494,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -512,7 +513,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -526,6 +527,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"fnDrawCallback": function ( oSettings ) {
|
||||
/* Need to redo the counters if filtered or sorted */
|
||||
@@ -551,6 +551,10 @@
|
||||
"aaSorting": [[ 1, 'asc' ]]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -565,6 +569,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -583,7 +588,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -597,6 +602,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var oTable = $('#example').dataTable();
|
||||
|
||||
/* Apply the jEditable handlers to the table */
|
||||
$('td', oTable.fnGetNodes()).editable( '../examples_support/editable_ajax.php', {
|
||||
oTable.$('td').editable( '../examples_support/editable_ajax.php', {
|
||||
"callback": function( sValue, y ) {
|
||||
var aPos = oTable.fnGetPosition( this );
|
||||
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
|
||||
@@ -479,12 +479,12 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
/* Init DataTables */
|
||||
var oTable = $('#example').dataTable();
|
||||
|
||||
/* Apply the jEditable handlers to the table */
|
||||
$('td', oTable.fnGetNodes()).editable( '../examples_support/editable_ajax.php', {
|
||||
oTable.$('td').editable( '../examples_support/editable_ajax.php', {
|
||||
"callback": function( sValue, y ) {
|
||||
var aPos = oTable.fnGetPosition( this );
|
||||
oTable.fnUpdate( sValue, aPos[0], aPos[1] );
|
||||
@@ -498,6 +498,10 @@
|
||||
"height": "14px"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -512,6 +516,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -530,7 +535,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -544,6 +549,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#form').submit( function() {
|
||||
var sData = $('input', oTable.fnGetNodes()).serialize();
|
||||
var sData = oTable.$('input').serialize();
|
||||
alert( "The following data would have been submitted to the server: \n\n"+sData );
|
||||
return false;
|
||||
} );
|
||||
@@ -530,17 +530,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>var oTable;
|
||||
<pre class="brush: js;">var oTable;
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#form').submit( function() {
|
||||
var sData = $('input', oTable.fnGetNodes()).serialize();
|
||||
var sData = oTable.$('input').serialize();
|
||||
alert( "The following data would have been submitted to the server: \n\n"+sData );
|
||||
return false;
|
||||
} );
|
||||
|
||||
oTable = $('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -555,6 +559,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -573,7 +578,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -587,6 +592,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -17,12 +17,11 @@
|
||||
"bSortClasses": false
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
var iCol = $('td').index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
oTable.$('td').hover( function() {
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
$('td.highlighted', oTable.fnGetNodes()).removeClass('highlighted');
|
||||
oTable.$('td.highlighted').removeClass('highlighted');
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
@@ -468,19 +467,22 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bSortClasses": false
|
||||
} );
|
||||
|
||||
$('td', oTable.fnGetNodes()).hover( function() {
|
||||
var iCol = $('td').index(this) % 5;
|
||||
var nTrs = oTable.fnGetNodes();
|
||||
$('td:nth-child('+(iCol+1)+')', nTrs).addClass( 'highlighted' );
|
||||
oTable.$('td').hover( function() {
|
||||
var iCol = $('td', this.parentNode).index(this) % 5;
|
||||
$('td:nth-child('+(iCol+1)+')', oTable.$('tr')).addClass( 'highlighted' );
|
||||
}, function() {
|
||||
$('td.highlighted', oTable.fnGetNodes()).removeClass('highlighted');
|
||||
oTable.$('td.highlighted').removeClass('highlighted');
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -495,6 +497,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -513,7 +516,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -527,6 +530,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>var asInitVals = new Array();
|
||||
<pre class="brush: js;">var asInitVals = new Array();
|
||||
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
@@ -536,6 +536,10 @@ $(document).ready(function() {
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
<p>Note that in the above code, the support functions are provided to ensure that the end user knows what data is being filtered upon. <b>fnFilter()</b> is the function of primary import here.</p>
|
||||
|
||||
|
||||
@@ -551,6 +555,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -569,7 +574,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -583,6 +588,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -538,7 +538,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>(function($) {
|
||||
<pre class="brush: js;">(function($) {
|
||||
/*
|
||||
* Function: fnGetColumnData
|
||||
* Purpose: Return an array of table values from a particular column.
|
||||
@@ -620,6 +620,10 @@ $(document).ready(function() {
|
||||
} );
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -634,6 +638,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -652,7 +657,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -666,6 +671,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -554,7 +554,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>function fnFilterGlobal ()
|
||||
<pre class="brush: js;">function fnFilterGlobal ()
|
||||
{
|
||||
$('#example').dataTable().fnFilter(
|
||||
$("#global_filter").val(),
|
||||
@@ -587,6 +587,10 @@ $(document).ready(function() {
|
||||
|
||||
// ... etc for the other four columns
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -601,6 +605,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -619,7 +624,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -633,6 +638,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -506,7 +506,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Formating function for row details */
|
||||
<pre class="brush: js;">/* Formating function for row details */
|
||||
function fnFormatDetails ( oTable, nTr )
|
||||
{
|
||||
var aData = oTable.fnGetData( nTr );
|
||||
@@ -566,6 +566,10 @@ $(document).ready(function() {
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -580,6 +584,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -598,7 +603,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -612,6 +617,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -13,12 +13,9 @@
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
/* Add a click handler to the rows - this could be used as a callback */
|
||||
/* Add/remove class to a row when clicked on */
|
||||
$('#example tr').click( function() {
|
||||
if ( $(this).hasClass('row_selected') )
|
||||
$(this).removeClass('row_selected');
|
||||
else
|
||||
$(this).addClass('row_selected');
|
||||
$(this).toggleClass('row_selected');
|
||||
} );
|
||||
|
||||
/* Init the table */
|
||||
@@ -31,17 +28,7 @@
|
||||
*/
|
||||
function fnGetSelected( oTableLocal )
|
||||
{
|
||||
var aReturn = new Array();
|
||||
var aTrs = oTableLocal.fnGetNodes();
|
||||
|
||||
for ( var i=0 ; i<aTrs.length ; i++ )
|
||||
{
|
||||
if ( $(aTrs[i]).hasClass('row_selected') )
|
||||
{
|
||||
aReturn.push( aTrs[i] );
|
||||
}
|
||||
}
|
||||
return aReturn;
|
||||
return oTableLocal.$('tr.row_selected');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
@@ -52,7 +39,7 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<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 using the API functions that DataTables provides. The example below uses the <b>fnRowCallback()</b> function to add a 'click' listener to each row, which will highlight the required row when selected. The indexes of the selected rows are then provided through the custom function <b>fnGetSelected()</b> for later processing.</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 the selected rows are then provided through the custom function <b>fnGetSelected()</b> for later processing.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
@@ -486,13 +473,10 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
/* Add a click handler to the rows - this could be used as a callback */
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
/* Add/remove class to a row when clicked on */
|
||||
$('#example tr').click( function() {
|
||||
if ( $(this).hasClass('row_selected') )
|
||||
$(this).removeClass('row_selected');
|
||||
else
|
||||
$(this).addClass('row_selected');
|
||||
$(this).toggleClass('row_selected');
|
||||
} );
|
||||
|
||||
/* Init the table */
|
||||
@@ -505,18 +489,12 @@
|
||||
*/
|
||||
function fnGetSelected( oTableLocal )
|
||||
{
|
||||
var aReturn = new Array();
|
||||
var aTrs = oTableLocal.fnGetNodes();
|
||||
|
||||
for ( var i=0 ; i<aTrs.length ; i++ )
|
||||
{
|
||||
if ( $(aTrs[i]).hasClass('row_selected') )
|
||||
{
|
||||
aReturn.push( aTrs[i] );
|
||||
}
|
||||
}
|
||||
return aReturn;
|
||||
return oTableLocal.$('tr.row_selected');
|
||||
}</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -531,6 +509,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -549,7 +528,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -563,6 +542,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -13,15 +13,17 @@
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var oTable;
|
||||
var giRedraw = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
/* Add a click handler to the rows - this could be used as a callback */
|
||||
$("#example tbody").click(function(event) {
|
||||
$(oTable.fnSettings().aoData).each(function (){
|
||||
$(this.nTr).removeClass('row_selected');
|
||||
});
|
||||
$(event.target.parentNode).addClass('row_selected');
|
||||
$("#example tbody tr").click( function( e ) {
|
||||
if ( $(this).hasClass('row_selected') ) {
|
||||
$(this).removeClass('row_selected');
|
||||
}
|
||||
else {
|
||||
oTable.$('tr.row_selected').removeClass('row_selected');
|
||||
$(this).addClass('row_selected');
|
||||
}
|
||||
});
|
||||
|
||||
/* Add a click handler for the delete row */
|
||||
@@ -38,17 +40,7 @@
|
||||
/* Get the rows which are currently selected */
|
||||
function fnGetSelected( oTableLocal )
|
||||
{
|
||||
var aReturn = new Array();
|
||||
var aTrs = oTableLocal.fnGetNodes();
|
||||
|
||||
for ( var i=0 ; i<aTrs.length ; i++ )
|
||||
{
|
||||
if ( $(aTrs[i]).hasClass('row_selected') )
|
||||
{
|
||||
aReturn.push( aTrs[i] );
|
||||
}
|
||||
}
|
||||
return aReturn;
|
||||
return oTableLocal.$('tr.row_selected');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
@@ -59,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<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 using the API functions that DataTables provides. The example below uses the <b>fnRowCallback()</b> function to add a 'click' listener to each row, which will highlight the required row when selected. The indexes of the selected rows are then provided through the custom function <b>fnGetSelected()</b> for later processing.</p>
|
||||
<p>It can be quite useful at times to provide the user with the option to select rows in a DataTable. In this example we use standard jQuery 'click' events to add a class to table rows to indicate that they have been selected. Note that we use <i>oTable.$()</i> when working with rows in the table to ensure that all rows are considered, regardless of paging and filtering.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<p><a href="javascript:void(0)" id="delete">Delete selected row</a></p>
|
||||
@@ -494,16 +486,18 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>var oTable;
|
||||
var giRedraw = false;
|
||||
<pre class="brush: js;">var oTable;
|
||||
|
||||
$(document).ready(function() {
|
||||
/* Add a click handler to the rows - this could be used as a callback */
|
||||
$("#example tbody").click(function(event) {
|
||||
$(oTable.fnSettings().aoData).each(function (){
|
||||
$(this.nTr).removeClass('row_selected');
|
||||
});
|
||||
$(event.target.parentNode).addClass('row_selected');
|
||||
$("#example tbody tr").click( function( e ) {
|
||||
if ( $(this).hasClass('row_selected') ) {
|
||||
$(this).removeClass('row_selected');
|
||||
}
|
||||
else {
|
||||
oTable.$('tr.row_selected').removeClass('row_selected');
|
||||
$(this).addClass('row_selected');
|
||||
}
|
||||
});
|
||||
|
||||
/* Add a click handler for the delete row */
|
||||
@@ -520,18 +514,12 @@ $(document).ready(function() {
|
||||
/* Get the rows which are currently selected */
|
||||
function fnGetSelected( oTableLocal )
|
||||
{
|
||||
var aReturn = new Array();
|
||||
var aTrs = oTableLocal.fnGetNodes();
|
||||
|
||||
for ( var i=0 ; i<aTrs.length ; i++ )
|
||||
{
|
||||
if ( $(aTrs[i]).hasClass('row_selected') )
|
||||
{
|
||||
aReturn.push( aTrs[i] );
|
||||
}
|
||||
}
|
||||
return aReturn;
|
||||
return oTableLocal.$('tr.row_selected');
|
||||
}</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -546,6 +534,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -564,7 +553,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -578,6 +567,7 @@ function fnGetSelected( oTableLocal )
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sScrollY": "200px",
|
||||
"bPaginate": false
|
||||
@@ -491,6 +491,10 @@ function fnShowHide( iCol )
|
||||
var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
|
||||
oTable.fnSetColumnVis( iCol, bVis ? false : true );
|
||||
}</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -505,6 +509,7 @@ function fnShowHide( iCol )
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -523,7 +528,7 @@ function fnShowHide( iCol )
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -537,6 +542,7 @@ function fnShowHide( iCol )
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$("#tabs").tabs( {
|
||||
"show": function(event, ui) {
|
||||
var oTable = $('div.dataTables_scrollBody>table.display', ui.panel).dataTable();
|
||||
@@ -317,6 +317,10 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -331,6 +335,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -349,7 +354,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -363,6 +368,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -407,6 +407,48 @@
|
||||
<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>
|
||||
<tfoot>
|
||||
<tr>
|
||||
@@ -423,11 +465,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sPaginationType": "full_numbers"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -442,6 +488,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -460,7 +507,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -474,6 +521,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -464,9 +464,13 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -481,6 +485,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -499,7 +504,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -513,6 +518,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -475,11 +475,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sDom": '<"top"i>rt<"bottom"flp><"clear">'
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -494,6 +498,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -512,7 +517,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -526,6 +531,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -460,15 +460,20 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bPaginate": false,
|
||||
"bLengthChange": false,
|
||||
"bFilter": true,
|
||||
"bSort": false,
|
||||
"bInfo": false,
|
||||
"bAutoWidth": false } );
|
||||
"bAutoWidth": false
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -483,6 +488,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -501,7 +507,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -515,6 +521,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
601
examples/basic_init/flexible_width.html
Normal file
@@ -0,0 +1,601 @@
|
||||
<!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" />
|
||||
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
|
||||
|
||||
<title>DataTables example</title>
|
||||
<style type="text/css" title="currentStyle">
|
||||
@import "../../media/css/demo_page.css";
|
||||
@import "../../media/css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );
|
||||
</script>
|
||||
</head>
|
||||
<body id="dt_example">
|
||||
<div id="container" style="width:80%">
|
||||
<div class="full_width big">
|
||||
DataTables - flexible width example
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>Often you may want to have your table resize dynamically with the page. Typically this is done by assigning width:100% 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 <i>width</i> attribute to the HTML table
|
||||
tag, this will be used as the width for the table (overruling any CSS styles).</p>
|
||||
<p>This example shows a table width <i>width="100%"</i> and the container is also flexible width, so as the window is resized, the table will also resize dynamically.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example" width="100%">
|
||||
<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>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
<th>Browser</th>
|
||||
<th>Platform(s)</th>
|
||||
<th>Engine version</th>
|
||||
<th>CSS grade</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
<div class="demo_links">
|
||||
<h2>Basic initialisation</h2>
|
||||
<ul>
|
||||
<li><a href="../basic_init/zero_config.html">Zero configuration</a></li>
|
||||
<li><a href="../basic_init/filter_only.html">Feature enablement</a></li>
|
||||
<li><a href="../basic_init/table_sorting.html">Sorting data</a></li>
|
||||
<li><a href="../basic_init/multi_col_sort.html">Multi-column sorting</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 - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
<a href="../basic_init/scroll_x.html">Horizontal</a> /
|
||||
<a href="../basic_init/scroll_y.html">Vertical</a> /
|
||||
<a href="../basic_init/scroll_xy.html">Both</a> /
|
||||
<a href="../basic_init/scroll_y_theme.html">Themed</a> /
|
||||
<a href="../basic_init/scroll_y_infinite.html">Infinite</a>
|
||||
</li>
|
||||
<li><a href="../basic_init/language.html">Change language information (internationalisation)</a></li>
|
||||
<li><a href="../basic_init/themes.html">ThemeRoller themes (Smoothness)</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Advanced initialisation</h2>
|
||||
<ul>
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
<li><a href="../advanced_init/dom_multiple_elements.html">Multiple table controls (sDom)</a></li>
|
||||
<li><a href="../advanced_init/length_menu.html">Defining length menu options</a></li>
|
||||
<li><a href="../advanced_init/complex_header.html">Complex headers and hidden columns</a></li>
|
||||
<li><a href="../advanced_init/dom_toolbar.html">Custom toolbar (element) around table</a></li>
|
||||
<li><a href="../advanced_init/highlight.html">Row highlighting with CSS</a></li>
|
||||
<li><a href="../advanced_init/row_grouping.html">Row grouping</a></li>
|
||||
<li><a href="../advanced_init/row_callback.html">Row callback</a></li>
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
<ul>
|
||||
<li><a href="../api/add_row.html">Dynamically add a new row</a></li>
|
||||
<li><a href="../api/multi_filter.html">Individual column filtering (using "input" elements)</a></li>
|
||||
<li><a href="../api/multi_filter_select.html">Individual column filtering (using "select" elements)</a></li>
|
||||
<li><a href="../api/highlight.html">Highlight rows and columns</a></li>
|
||||
<li><a href="../api/row_details.html">Show and hide details about a particular record</a></li>
|
||||
<li><a href="../api/select_row.html">User selectable rows (multiple rows)</a></li>
|
||||
<li><a href="../api/select_single_row.html">User selectable rows (single row) and delete rows</a></li>
|
||||
<li><a href="../api/editable.html">Editable rows (with jEditable)</a></li>
|
||||
<li><a href="../api/form.html">Submit form with elements in table</a></li>
|
||||
<li><a href="../api/counter_column.html">Index column (static number column)</a></li>
|
||||
<li><a href="../api/show_hide.html">Show and hide columns dynamically</a></li>
|
||||
<li><a href="../api/api_in_init.html">API function use in initialisation object (callback)</a></li>
|
||||
<li><a href="../api/tabs_and_scrolling.html">DataTables scrolling and tabs</a></li>
|
||||
<li><a href="../api/regex.html">Regular expression filtering</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="demo_links">
|
||||
<h2>Data sources</h2>
|
||||
<ul>
|
||||
<li><a href="../data_sources/dom.html">DOM</a></li>
|
||||
<li><a href="../data_sources/js_array.html">Javascript array</a></li>
|
||||
<li><a href="../data_sources/ajax.html">Ajax source</a></li>
|
||||
<li><a href="../data_sources/server_side.html">Server side processing</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Server-side processing</h2>
|
||||
<ul>
|
||||
<li><a href="../server_side/server_side.html">Obtain server-side data</a></li>
|
||||
<li><a href="../server_side/custom_vars.html">Add extra HTTP variables</a></li>
|
||||
<li><a href="../server_side/post.html">Use HTTP POST</a></li>
|
||||
<li><a href="../server_side/ids.html">Automatic addition of IDs and classes to rows</a></li>
|
||||
<li><a href="../server_side/object_data.html">Reading table data from objects</a></li>
|
||||
<li><a href="../server_side/row_details.html">Show and hide details about a particular record</a></li>
|
||||
<li><a href="../server_side/select_rows.html">User selectable rows (multiple rows)</a></li>
|
||||
<li><a href="../server_side/jsonp.html">JSONP for a cross domain data source</a></li>
|
||||
<li><a href="../server_side/editable.html">jEditable integration with DataTables</a></li>
|
||||
<li><a href="../server_side/defer_loading.html">Deferred loading of Ajax data</a></li>
|
||||
<li><a href="../server_side/column_ordering.html">Custom column ordering (in callback data)</a></li>
|
||||
<li><a href="../server_side/pipeline.html">Pipelining data (reduce Ajax calls for paging)</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Ajax data source</h2>
|
||||
<ul>
|
||||
<li><a href="../ajax/ajax.html">Ajax sourced data (array of arrays)</a></li>
|
||||
<li><a href="../ajax/objects.html">Ajax sourced data (array of objects)</a></li>
|
||||
<li><a href="../ajax/defer_render.html">Deferred DOM creation for extra speed</a></li>
|
||||
<li><a href="../ajax/null_data_source.html">Empty data source columns</a></li>
|
||||
<li><a href="../ajax/custom_data_property.html">Use a data source other than aaData (the default)</a></li>
|
||||
<li><a href="../ajax/objects_subarrays.html">Read column data from sub-arrays</a></li>
|
||||
<li><a href="../ajax/deep.html">Read column data from deeply nested properties</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>Plug-ins</h2>
|
||||
<ul>
|
||||
<li><a href="../plug-ins/plugin_api.html">Add custom API functions</a></li>
|
||||
<li><a href="../plug-ins/sorting_plugin.html">Sorting and automatic type detection</a></li>
|
||||
<li><a href="../plug-ins/sorting_sType.html">Sorting without automatic type detection</a></li>
|
||||
<li><a href="../plug-ins/paging_plugin.html">Custom pagination controls</a></li>
|
||||
<li><a href="../plug-ins/range_filtering.html">Range filtering / custom filtering</a></li>
|
||||
<li><a href="../plug-ins/dom_sort.html">Live DOM sorting</a></li>
|
||||
<li><a href="../plug-ins/html_sort.html">Automatic HTML type detection</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="footer" class="clear" style="text-align:center;">
|
||||
<p>
|
||||
Please refer to the <a href="http://www.datatables.net/usage">DataTables documentation</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>
|
||||
|
||||
<span style="font-size:10px;">
|
||||
DataTables designed and created by <a href="http://www.sprymedia.co.uk">Allan Jardine</a> © 2007-2011<br>
|
||||
DataTables is dual licensed under the <a href="http://www.datatables.net/license_gpl2">GPL v2 license</a> or a <a href="http://www.datatables.net/license_bsd">BSD (3-point) license</a>.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -458,13 +458,17 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aoColumnDefs": [
|
||||
{ "bSearchable": false, "bVisible": false, "aTargets": [ 2 ] },
|
||||
{ "bVisible": false, "aTargets": [ 3 ] }
|
||||
] } );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -479,6 +483,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -497,7 +502,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -511,6 +516,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "Display _MENU_ records per page",
|
||||
@@ -473,6 +473,10 @@ $('#example').dataTable( {
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -487,6 +491,7 @@ $('#example').dataTable( {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -505,7 +510,7 @@ $('#example').dataTable( {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -519,6 +524,7 @@ $('#example').dataTable( {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Define two custom functions (asc and desc) for string sorting */
|
||||
<pre class="brush: js;">/* Define two custom functions (asc and desc) for string sorting */
|
||||
jQuery.fn.dataTableExt.oSort['string-case-asc'] = function(x,y) {
|
||||
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
|
||||
};
|
||||
@@ -496,6 +496,10 @@ $(document).ready(function() {
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -510,6 +514,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -528,7 +533,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -542,6 +547,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -274,9 +274,13 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('.dataTable').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -291,6 +295,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -309,7 +314,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -323,6 +328,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -463,13 +463,18 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sScrollX": "100%",
|
||||
"sScrollXInner": "110%",
|
||||
"bScrollCollapse": true
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -484,6 +489,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -502,7 +508,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -516,6 +522,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -454,13 +454,17 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sScrollY": 200,
|
||||
"sScrollX": "100%",
|
||||
"sScrollXInner": "110%"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -475,6 +479,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -493,7 +498,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -507,6 +512,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -462,12 +462,16 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sScrollY": "200px",
|
||||
"bPaginate": false
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -482,6 +486,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -500,7 +505,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -514,6 +519,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -464,13 +464,17 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bScrollInfinite": true,
|
||||
"bScrollCollapse": true,
|
||||
"sScrollY": "200px"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -485,6 +489,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -503,7 +508,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -517,6 +522,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -463,13 +463,17 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"sScrollY": 200,
|
||||
"bJQueryUI": true,
|
||||
"sPaginationType": "full_numbers"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -484,6 +488,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -502,7 +507,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -516,6 +521,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -460,11 +460,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bStateSave": true
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -479,6 +483,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -497,7 +502,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -511,6 +516,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -460,11 +460,15 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"aaSorting": [[ 4, "desc" ]]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -479,6 +483,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -497,7 +502,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -511,6 +516,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -453,12 +453,16 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
oTable = $('#example').dataTable({
|
||||
"bJQueryUI": true,
|
||||
"sPaginationType": "full_numbers"
|
||||
});
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -473,6 +477,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -491,7 +496,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -505,6 +510,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="demo">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example" width="100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Rendering engine</th>
|
||||
@@ -458,9 +458,13 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -475,6 +479,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -493,7 +498,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -507,6 +512,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>Although DataTables is built from the principle of progressive enhancement, it is often useful to be able to construct a table from an AJAX source. This can be done in one of two ways - either using the <b>aData</b> initialisation parameter which takes an array of data, or using the <b>sAjaxSource</b> initialisation parameter which will have DataTables go to that source with an XHR call and load data from there. This example shows the latter method in action. DataTables expects an object with an array called "aaData" with the data source.</p>
|
||||
<p>Although DataTables is built from the principle of progressive enhancement, it is often useful to be able to construct a table from an AJAX source. This can be done in one of two ways - either using the <b>aaData</b> initialisation parameter which takes an array of data, or using the <b>sAjaxSource</b> initialisation parameter which will have DataTables go to that source with an XHR call and load data from there. This example shows the latter method in action. DataTables expects an object with an array called "aaData" with the data source.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="dynamic">
|
||||
@@ -59,12 +59,20 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"sAjaxSource": '../ajax/sources/arrays.txt'
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -79,6 +87,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -97,7 +106,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -111,6 +120,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -458,9 +458,13 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -475,6 +479,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -493,7 +498,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -507,6 +512,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#demo').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
|
||||
$('#example').dataTable( {
|
||||
"aaData": [
|
||||
@@ -150,6 +150,10 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -164,6 +168,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -182,7 +187,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -196,6 +201,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
@import "../../media/css/demo_table.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
|
||||
<script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
@@ -64,13 +63,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "../server_side/scripts/server_processing.php"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Server side (PHP) code</h1>
|
||||
@@ -264,6 +271,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -282,7 +290,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -296,6 +304,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
377
examples/examples_support/syntax/css/shCore.css
Normal file
@@ -0,0 +1,377 @@
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/SyntaxHighlighter
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
|
||||
*
|
||||
* @version
|
||||
* 3.0.83 (July 02 2010)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2010 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
*/
|
||||
.syntaxhighlighter a,
|
||||
.syntaxhighlighter div,
|
||||
.syntaxhighlighter code,
|
||||
.syntaxhighlighter table,
|
||||
.syntaxhighlighter table td,
|
||||
.syntaxhighlighter table tr,
|
||||
.syntaxhighlighter table tbody,
|
||||
.syntaxhighlighter table thead,
|
||||
.syntaxhighlighter table caption,
|
||||
.syntaxhighlighter textarea {
|
||||
-moz-border-radius: 0 0 0 0 !important;
|
||||
-webkit-border-radius: 0 0 0 0 !important;
|
||||
background: none !important;
|
||||
border: 0 !important;
|
||||
bottom: auto !important;
|
||||
float: none !important;
|
||||
height: auto !important;
|
||||
left: auto !important;
|
||||
line-height: 1.1em !important;
|
||||
margin: 0 !important;
|
||||
outline: 0 !important;
|
||||
overflow: visible !important;
|
||||
padding: 0 !important;
|
||||
position: static !important;
|
||||
right: auto !important;
|
||||
text-align: left !important;
|
||||
top: auto !important;
|
||||
vertical-align: baseline !important;
|
||||
width: auto !important;
|
||||
box-sizing: content-box !important;
|
||||
font-family: "Consolas","Monaco","Bitstream Vera Sans Mono","Courier New",Courier,monospace !important;
|
||||
font-weight: normal !important;
|
||||
font-style: normal !important;
|
||||
font-size: 1em !important;
|
||||
min-height: inherit !important;
|
||||
min-height: auto !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter {
|
||||
width: 100% !important;
|
||||
margin: 1em 0 1em 0 !important;
|
||||
position: relative !important;
|
||||
overflow: auto !important;
|
||||
font-size: 1em !important;
|
||||
}
|
||||
.syntaxhighlighter.source {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
.syntaxhighlighter .bold {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.syntaxhighlighter .italic {
|
||||
font-style: italic !important;
|
||||
}
|
||||
.syntaxhighlighter .line {
|
||||
white-space: pre !important;
|
||||
}
|
||||
.syntaxhighlighter table {
|
||||
width: 100% !important;
|
||||
}
|
||||
.syntaxhighlighter table caption {
|
||||
text-align: left !important;
|
||||
padding: .5em 0 0.5em 1em !important;
|
||||
}
|
||||
.syntaxhighlighter table td.code {
|
||||
width: 100% !important;
|
||||
}
|
||||
.syntaxhighlighter table td.code .container {
|
||||
position: relative !important;
|
||||
}
|
||||
.syntaxhighlighter table td.code .container textarea {
|
||||
box-sizing: border-box !important;
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
top: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: none !important;
|
||||
background: white !important;
|
||||
padding-left: 1em !important;
|
||||
overflow: hidden !important;
|
||||
white-space: pre !important;
|
||||
}
|
||||
.syntaxhighlighter table td.gutter .line {
|
||||
text-align: right !important;
|
||||
padding: 2px 0.5em 2px 1em !important;
|
||||
}
|
||||
.syntaxhighlighter table td.code .line {
|
||||
padding: 2px 1em !important;
|
||||
}
|
||||
.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
|
||||
padding-left: 0em !important;
|
||||
}
|
||||
.syntaxhighlighter.show {
|
||||
display: block !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed table {
|
||||
display: none !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar {
|
||||
padding: 0.1em 0.8em 0em 0.8em !important;
|
||||
font-size: 1em !important;
|
||||
position: static !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar span {
|
||||
display: inline !important;
|
||||
margin-right: 1em !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar span a {
|
||||
padding: 0 !important;
|
||||
display: none !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
|
||||
display: inline !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar {
|
||||
position: absolute !important;
|
||||
right: 1px !important;
|
||||
top: 1px !important;
|
||||
font-size: 10px !important;
|
||||
z-index: 10 !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar span.title {
|
||||
display: inline !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar a {
|
||||
display: block !important;
|
||||
text-align: center !important;
|
||||
text-decoration: none !important;
|
||||
padding-top: 1px !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar a.expandSource {
|
||||
display: none !important;
|
||||
}
|
||||
.syntaxhighlighter.ie {
|
||||
font-size: .9em !important;
|
||||
padding: 1px 0 1px 0 !important;
|
||||
}
|
||||
.syntaxhighlighter.ie .toolbar {
|
||||
line-height: 8px !important;
|
||||
}
|
||||
.syntaxhighlighter.ie .toolbar a {
|
||||
padding-top: 0px !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .line.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.alt2 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted .number,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt2 .content {
|
||||
background: none !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .line .number {
|
||||
color: #bbbbbb !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .line .content {
|
||||
color: black !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .toolbar {
|
||||
display: none !important;
|
||||
}
|
||||
.syntaxhighlighter.printing a {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
|
||||
color: black !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
|
||||
color: #008200 !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
|
||||
color: blue !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .keyword {
|
||||
color: #006699 !important;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .preprocessor {
|
||||
color: gray !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .variable {
|
||||
color: #aa7700 !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .value {
|
||||
color: #009900 !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .functions {
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .constants {
|
||||
color: #0066cc !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .script {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
|
||||
color: gray !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
|
||||
color: red !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* SyntaxHighlighter
|
||||
* http://alexgorbatchev.com/SyntaxHighlighter
|
||||
*
|
||||
* SyntaxHighlighter is donationware. If you are using it, please donate.
|
||||
* http://alexgorbatchev.com/SyntaxHighlighter/donate.html
|
||||
*
|
||||
* @version
|
||||
* 3.0.83 (July 02 2010)
|
||||
*
|
||||
* @copyright
|
||||
* Copyright (C) 2004-2010 Alex Gorbatchev.
|
||||
*
|
||||
* @license
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
*/
|
||||
.syntaxhighlighter {
|
||||
background-color: white !important;
|
||||
font-size: 13px !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
.syntaxhighlighter .line.alt1 {
|
||||
background-color: white !important;
|
||||
}
|
||||
.syntaxhighlighter .line.alt2 {
|
||||
background-color: #F8F8F8 !important;
|
||||
}
|
||||
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
|
||||
background-color: #e0e0e0 !important;
|
||||
}
|
||||
.syntaxhighlighter .line.highlighted.number {
|
||||
color: black !important;
|
||||
}
|
||||
.syntaxhighlighter table caption {
|
||||
color: black !important;
|
||||
}
|
||||
.syntaxhighlighter .gutter {
|
||||
}
|
||||
.syntaxhighlighter .gutter div {
|
||||
color: #5C5C5C !important;
|
||||
width: 20px !important;
|
||||
}
|
||||
.syntaxhighlighter .gutter .line.alt1, .syntaxhighlighter .gutter .line.alt2 {
|
||||
background-color: white !important;
|
||||
}
|
||||
.odd .syntaxhighlighter .gutter .line.alt1, .odd .syntaxhighlighter .gutter .line.alt2 {
|
||||
background-color: #F2F2F2 !important;
|
||||
}
|
||||
.syntaxhighlighter .gutter .line {
|
||||
border-right: 3px solid #4E6CA3 !important;
|
||||
}
|
||||
.syntaxhighlighter .gutter .line.highlighted {
|
||||
background-color: #4E6CA3 !important;
|
||||
color: white !important;
|
||||
}
|
||||
.syntaxhighlighter.printing .line .content {
|
||||
border: none !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed {
|
||||
overflow: visible !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar {
|
||||
color: blue !important;
|
||||
background: white !important;
|
||||
border: 1px solid #4E6CA3 !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar a {
|
||||
color: blue !important;
|
||||
}
|
||||
.syntaxhighlighter.collapsed .toolbar a:hover {
|
||||
color: red !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar {
|
||||
color: white !important;
|
||||
border: none !important;
|
||||
}
|
||||
.syntaxhighlighter .toolbar a {
|
||||
font: 100%/1.45em "Lucida Grande", Verdana, Arial, Helvetica, sans-serif !important;
|
||||
color: white !important;
|
||||
background: #4E6CA3 !important;
|
||||
float: right !important;
|
||||
padding: 2px 5px !important;
|
||||
clear: both;
|
||||
}
|
||||
.syntaxhighlighter .toolbar a:hover {
|
||||
color: #b7c5df !important;
|
||||
background: #39568b !important;
|
||||
}
|
||||
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
|
||||
color: black !important;
|
||||
}
|
||||
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
|
||||
color: #008200 !important;
|
||||
}
|
||||
.syntaxhighlighter .string, .syntaxhighlighter .string a {
|
||||
color: blue !important;
|
||||
}
|
||||
.syntaxhighlighter .keyword {
|
||||
color: #006699 !important;
|
||||
}
|
||||
.syntaxhighlighter .preprocessor {
|
||||
color: gray !important;
|
||||
}
|
||||
.syntaxhighlighter .variable {
|
||||
color: #aa7700 !important;
|
||||
}
|
||||
.syntaxhighlighter .value {
|
||||
color: #009900 !important;
|
||||
}
|
||||
.syntaxhighlighter .functions {
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
.syntaxhighlighter .constants {
|
||||
color: #0066cc !important;
|
||||
}
|
||||
.syntaxhighlighter .script {
|
||||
font-weight: bold !important;
|
||||
color: #006699 !important;
|
||||
background-color: none !important;
|
||||
}
|
||||
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
|
||||
color: gray !important;
|
||||
}
|
||||
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
|
||||
color: #ff1493 !important;
|
||||
}
|
||||
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
|
||||
color: red !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .keyword {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.datatables_ref:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .dtapi {
|
||||
color: #069;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .dtapi:hover {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
}
|
||||
|
||||
BIN
examples/examples_support/syntax/images/arrow.jpg
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
examples/examples_support/syntax/images/extended.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
346
examples/examples_support/syntax/js/shCore.js
vendored
Normal file
20
examples/examples_support/syntax/license/Syntax Highlighter
Normal file
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2003, 2004 Jim Weirich
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -29,6 +29,7 @@
|
||||
<li><a href="basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -47,7 +48,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="advanced_init/events_live.html">Live events</a> /
|
||||
<a href="advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -61,6 +62,7 @@
|
||||
<li><a href="advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -960,7 +960,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Create an array with the values of all the input boxes in a column */
|
||||
<pre class="brush: js;">/* Create an array with the values of all the input boxes in a column */
|
||||
$.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
|
||||
{
|
||||
var aData = [];
|
||||
@@ -1003,6 +1003,10 @@ $(document).ready(function() {
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -1017,6 +1021,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -1035,7 +1040,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -1049,6 +1054,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>jQuery.fn.dataTableExt.aTypes.push(
|
||||
<pre class="brush: js;">jQuery.fn.dataTableExt.aTypes.push(
|
||||
function ( sData ) {
|
||||
return 'html';
|
||||
}
|
||||
@@ -69,6 +69,10 @@
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -83,6 +87,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -101,7 +106,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -115,6 +120,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -577,7 +577,7 @@ $.fn.dataTableExt.oPagination.scrolling = {
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Time between each scrolling frame */
|
||||
<pre class="brush: js;">/* Time between each scrolling frame */
|
||||
$.fn.dataTableExt.oPagination.iTweenTime = 100;
|
||||
|
||||
$.fn.dataTableExt.oPagination.scrolling = {
|
||||
@@ -699,6 +699,10 @@ $(document).ready(function() {
|
||||
"sPaginationType": "scrolling"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -713,6 +717,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -731,7 +736,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -745,6 +750,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -493,7 +493,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/*
|
||||
<pre class="brush: js;">/*
|
||||
* Function: fnGetHiddenTrNodes
|
||||
* Purpose: Get all of the hidden TR nodes (i.e. the ones which aren't on display)
|
||||
* Returns: array:
|
||||
@@ -529,6 +529,10 @@ $(document).ready(function() {
|
||||
alert( nHidden.length +' nodes were returned' );
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -543,6 +547,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -561,7 +566,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -575,6 +580,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Custom filtering function which will filter data in column four between two values */
|
||||
<pre class="brush: js;">/* Custom filtering function which will filter data in column four between two values */
|
||||
$.fn.dataTableExt.afnFiltering.push(
|
||||
function( oSettings, aData, iDataIndex ) {
|
||||
var iMin = document.getElementById('min').value * 1;
|
||||
@@ -533,6 +533,10 @@ $(document).ready(function() {
|
||||
$('#min').keyup( function() { oTable.fnDraw(); } );
|
||||
$('#max').keyup( function() { oTable.fnDraw(); } );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -547,6 +551,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -565,7 +570,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -579,6 +584,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -509,7 +509,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>/* Note 'unshift' does not work in IE6. A simply array concatenation would. This is used
|
||||
<pre class="brush: js;">/* Note 'unshift' does not work in IE6. A simply array concatenation would. This is used
|
||||
* to give the custom type top priority
|
||||
*/
|
||||
jQuery.fn.dataTableExt.aTypes.unshift(
|
||||
@@ -562,6 +562,10 @@ jQuery.fn.dataTableExt.oSort['numeric-comma-desc'] = function(a,b) {
|
||||
$(document).ready(function() {
|
||||
$('#example').dataTable();
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -576,6 +580,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -594,7 +599,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -608,6 +613,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -483,7 +483,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>jQuery.fn.dataTableExt.oSort['numeric-comma-asc'] = function(a,b) {
|
||||
<pre class="brush: js;">jQuery.fn.dataTableExt.oSort['numeric-comma-asc'] = function(a,b) {
|
||||
var x = (a == "-") ? 0 : a.replace( /,/, "." );
|
||||
var y = (b == "-") ? 0 : b.replace( /,/, "." );
|
||||
x = parseFloat( x );
|
||||
@@ -510,6 +510,10 @@ $(document).ready(function() {
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -524,6 +528,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -542,7 +547,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -556,6 +561,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
@@ -84,6 +84,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -98,6 +106,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -116,7 +125,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -130,6 +139,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -17,13 +17,8 @@
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/server_processing.php",
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
/* Add some extra data to the sender */
|
||||
aoData.push( { "name": "more_data", "value": "my_value" } );
|
||||
$.getJSON( sSource, aoData, function (json) {
|
||||
/* Do whatever additional processing you want on the callback, then tell DataTables */
|
||||
fnCallback(json);
|
||||
} );
|
||||
"fnServerParams": function ( aoData ) {
|
||||
aoData.push( { "name": "more_data", "value": "my_value" } );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
@@ -36,7 +31,7 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>It can often be useful to send a little bit of extra information to the server when utilising DataTables' server-side processing option. This can be done by overriding the function used internally to get the JSON data from the server through the use of the "fnServerData" callback. This function takes three parameters (the same as <a href="http://docs.jquery.com/Ajax/jQuery.getJSON">$.getJSON()</a>, to be manipulated as you wish. This allows you to add extra data to the second parameter and then make the AJAX call, or you can call a Google Gears DB, or whatever you want. This example shows adding a single extra HTTP variable.</p>
|
||||
<p>It can often be useful to send a little bit of extra information to the server when utilising DataTables' server-side processing option. This can be done by using the <a href="http://datatables.net/ref#fnServerParams">fnServerParams</a> callback function which is called whenever an XHR is sent to the server. fnServerParams Takes a single parameter, the array of name/value pairs of parameters that are to be sent to the server. You can manipulate this as you require - typically adding another parameter, as shown in this example.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="dynamic">
|
||||
@@ -70,21 +65,24 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/server_processing.php",
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
/* Add some extra data to the sender */
|
||||
aoData.push( { "name": "more_data", "value": "my_value" } );
|
||||
$.getJSON( sSource, aoData, function (json) {
|
||||
/* Do whatever additional processing you want on the callback, then tell DataTables */
|
||||
fnCallback(json)
|
||||
} );
|
||||
}
|
||||
"sAjaxSource": "scripts/server_processing.php"
|
||||
"fnServerParams": function ( aoData ) {
|
||||
aoData.push( { "name": "more_data", "value": "my_value" } );
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -99,6 +97,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -117,7 +116,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -131,6 +130,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
@@ -138,6 +138,14 @@
|
||||
"iDeferLoading": 57
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -152,6 +160,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -170,7 +179,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -184,6 +193,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var oTable = $('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
@@ -88,6 +88,14 @@
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -102,6 +110,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -120,7 +129,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -134,6 +143,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -62,13 +62,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/ids.php"
|
||||
"sAjaxSource": "scripts/id.php"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -83,6 +91,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -101,7 +110,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -115,6 +124,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
@@ -87,6 +87,14 @@
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -101,6 +109,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -119,7 +128,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -133,6 +142,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
@@ -84,6 +84,14 @@
|
||||
]
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -98,6 +106,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -116,7 +125,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -130,6 +139,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>var oCache = {
|
||||
<pre class="brush: js;">var oCache = {
|
||||
iCacheLower: -1
|
||||
};
|
||||
|
||||
@@ -278,6 +278,14 @@ $(document).ready(function() {
|
||||
"fnServerData": fnDataTablesPipeline
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -292,6 +300,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -310,7 +319,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -324,6 +333,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -17,15 +17,7 @@
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/post.php",
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
$.ajax( {
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": fnCallback
|
||||
} );
|
||||
}
|
||||
"sServerMethod": "POST"
|
||||
} );
|
||||
} );
|
||||
</script>
|
||||
@@ -37,7 +29,7 @@
|
||||
</div>
|
||||
|
||||
<h1>Preamble</h1>
|
||||
<p>The default HTTP method that DataTables uses to get data from the server-side if GET, however, there are times when you may wish to use POST. This is very easy using the fnServerData() initialisation parameter, as shown in this example.</p>
|
||||
<p>The default HTTP method that DataTables uses to get data from the server-side if GET, however, there are times when you may wish to use POST. This is very easy using the sServerMethod initialisation parameter, which is simply set to the HTTP method that you want to use - the default is 'GET' and this example shows 'POST' being used.</p>
|
||||
|
||||
<h1>Live example</h1>
|
||||
<div id="dynamic">
|
||||
@@ -71,22 +63,22 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/post.php",
|
||||
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
||||
$.ajax( {
|
||||
"dataType": 'json',
|
||||
"type": "POST",
|
||||
"url": sSource,
|
||||
"data": aoData,
|
||||
"success": fnCallback
|
||||
} );
|
||||
}
|
||||
"sServerMethod": "POST"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -101,6 +93,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -119,7 +112,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -133,6 +126,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>var oTable;
|
||||
<pre class="brush: js;">var oTable;
|
||||
|
||||
/* Formating function for row details */
|
||||
function fnFormatDetails ( nTr )
|
||||
@@ -151,6 +151,14 @@ $(document).ready(function() {
|
||||
}
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -165,6 +173,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -183,7 +192,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -197,6 +206,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
179
examples/server_side/scripts/id_jsonp.php
Normal file
@@ -0,0 +1,179 @@
|
||||
<?php
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Easy set variables
|
||||
*/
|
||||
|
||||
/* Array of database columns which should be read and sent back to DataTables. Use a space where
|
||||
* you want to insert a non-database field (for example a counter or static image)
|
||||
*/
|
||||
$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );
|
||||
|
||||
/* Indexed column (used for fast and accurate table cardinality) */
|
||||
$sIndexColumn = "id";
|
||||
|
||||
/* DB table to use */
|
||||
$sTable = "ajax";
|
||||
|
||||
/* Database connection information */
|
||||
$gaSql['user'] = "";
|
||||
$gaSql['password'] = "";
|
||||
$gaSql['db'] = "";
|
||||
$gaSql['server'] = "localhost";
|
||||
|
||||
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
|
||||
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
|
||||
* no need to edit below this line
|
||||
*/
|
||||
|
||||
/*
|
||||
* MySQL connection
|
||||
*/
|
||||
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
|
||||
die( 'Could not open connection to server' );
|
||||
|
||||
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
|
||||
die( 'Could not select database '. $gaSql['db'] );
|
||||
|
||||
|
||||
/*
|
||||
* Paging
|
||||
*/
|
||||
$sLimit = "";
|
||||
if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
|
||||
{
|
||||
$sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
|
||||
mysql_real_escape_string( $_GET['iDisplayLength'] );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Ordering
|
||||
*/
|
||||
$sOrder = "";
|
||||
if ( isset( $_GET['iSortCol_0'] ) )
|
||||
{
|
||||
$sOrder = "ORDER BY ";
|
||||
for ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )
|
||||
{
|
||||
if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" )
|
||||
{
|
||||
$sOrder .= $aColumns[ intval( $_GET['iSortCol_'.$i] ) ]."
|
||||
".mysql_real_escape_string( $_GET['sSortDir_'.$i] ) .", ";
|
||||
}
|
||||
}
|
||||
|
||||
$sOrder = substr_replace( $sOrder, "", -2 );
|
||||
if ( $sOrder == "ORDER BY" )
|
||||
{
|
||||
$sOrder = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filtering
|
||||
* NOTE this does not match the built-in DataTables filtering which does it
|
||||
* word by word on any field. It's possible to do here, but concerned about efficiency
|
||||
* on very large tables, and MySQL's regex functionality is very limited
|
||||
*/
|
||||
$sWhere = "";
|
||||
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
|
||||
{
|
||||
$sWhere = "WHERE (";
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
|
||||
}
|
||||
$sWhere = substr_replace( $sWhere, "", -3 );
|
||||
$sWhere .= ')';
|
||||
}
|
||||
|
||||
/* Individual column filtering */
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' )
|
||||
{
|
||||
if ( $sWhere == "" )
|
||||
{
|
||||
$sWhere = "WHERE ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sWhere .= " AND ";
|
||||
}
|
||||
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SQL queries
|
||||
* Get data to display
|
||||
*/
|
||||
$sQuery = "
|
||||
SELECT SQL_CALC_FOUND_ROWS id, ".str_replace(" , ", " ", implode(", ", $aColumns))."
|
||||
FROM $sTable
|
||||
$sWhere
|
||||
$sOrder
|
||||
$sLimit
|
||||
";
|
||||
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
|
||||
/* Data set length after filtering */
|
||||
$sQuery = "
|
||||
SELECT FOUND_ROWS()
|
||||
";
|
||||
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
|
||||
$iFilteredTotal = $aResultFilterTotal[0];
|
||||
|
||||
/* Total data set length */
|
||||
$sQuery = "
|
||||
SELECT COUNT(".$sIndexColumn.")
|
||||
FROM $sTable
|
||||
";
|
||||
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
$aResultTotal = mysql_fetch_array($rResultTotal);
|
||||
$iTotal = $aResultTotal[0];
|
||||
|
||||
|
||||
/*
|
||||
* Output
|
||||
*/
|
||||
$output = array(
|
||||
"sEcho" => intval($_GET['sEcho']),
|
||||
"iTotalRecords" => $iTotal,
|
||||
"iTotalDisplayRecords" => $iFilteredTotal,
|
||||
"aaData" => array()
|
||||
);
|
||||
|
||||
while ( $aRow = mysql_fetch_array( $rResult ) )
|
||||
{
|
||||
$row = array();
|
||||
|
||||
// Add the row ID and class to the object
|
||||
$row['DT_RowId'] = 'row_'.$aRow['id'];
|
||||
$row['DT_RowClass'] = 'grade'.$aRow['grade'];
|
||||
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
if ( $aColumns[$i] == "version" )
|
||||
{
|
||||
/* Special output formatting for 'version' column */
|
||||
$row[] = ($aRow[ $aColumns[$i] ]=="0") ? '-' : $aRow[ $aColumns[$i] ];
|
||||
}
|
||||
else if ( $aColumns[$i] != ' ' )
|
||||
{
|
||||
/* General output */
|
||||
$row[] = $aRow[ $aColumns[$i] ];
|
||||
}
|
||||
}
|
||||
$output['aaData'][] = $row;
|
||||
}
|
||||
|
||||
echo $_GET['callback'].'('.json_encode( $output ).');';
|
||||
?>
|
||||
176
examples/server_side/scripts/objects_jsonp.php
Normal file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Easy set variables
|
||||
*/
|
||||
|
||||
/* Array of database columns which should be read and sent back to DataTables. Use a space where
|
||||
* you want to insert a non-database field (for example a counter or static image)
|
||||
*/
|
||||
$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );
|
||||
|
||||
/* Indexed column (used for fast and accurate table cardinality) */
|
||||
$sIndexColumn = "id";
|
||||
|
||||
/* DB table to use */
|
||||
$sTable = "ajax";
|
||||
|
||||
/* Database connection information */
|
||||
$gaSql['user'] = "";
|
||||
$gaSql['password'] = "";
|
||||
$gaSql['db'] = "";
|
||||
$gaSql['server'] = "localhost";
|
||||
|
||||
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
|
||||
include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
|
||||
* no need to edit below this line
|
||||
*/
|
||||
|
||||
/*
|
||||
* MySQL connection
|
||||
*/
|
||||
$gaSql['link'] = mysql_pconnect( $gaSql['server'], $gaSql['user'], $gaSql['password'] ) or
|
||||
die( 'Could not open connection to server' );
|
||||
|
||||
mysql_select_db( $gaSql['db'], $gaSql['link'] ) or
|
||||
die( 'Could not select database '. $gaSql['db'] );
|
||||
|
||||
|
||||
/*
|
||||
* Paging
|
||||
*/
|
||||
$sLimit = "";
|
||||
if ( isset( $_GET['iDisplayStart'] ) && $_GET['iDisplayLength'] != '-1' )
|
||||
{
|
||||
$sLimit = "LIMIT ".mysql_real_escape_string( $_GET['iDisplayStart'] ).", ".
|
||||
mysql_real_escape_string( $_GET['iDisplayLength'] );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Ordering
|
||||
*/
|
||||
$sOrder = "";
|
||||
if ( isset( $_GET['iSortCol_0'] ) )
|
||||
{
|
||||
$sOrder = "ORDER BY ";
|
||||
for ( $i=0 ; $i<intval( $_GET['iSortingCols'] ) ; $i++ )
|
||||
{
|
||||
if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" )
|
||||
{
|
||||
$iColumnIndex = array_search( $_GET['mDataProp_'.$_GET['iSortCol_'.$i]], $aColumns );
|
||||
$sOrder .= $aColumns[ $iColumnIndex ]."
|
||||
".mysql_real_escape_string( $_GET['sSortDir_'.$i] ) .", ";
|
||||
}
|
||||
}
|
||||
|
||||
$sOrder = substr_replace( $sOrder, "", -2 );
|
||||
if ( $sOrder == "ORDER BY" )
|
||||
{
|
||||
$sOrder = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Filtering
|
||||
* NOTE this does not match the built-in DataTables filtering which does it
|
||||
* word by word on any field. It's possible to do here, but concerned about efficiency
|
||||
* on very large tables, and MySQL's regex functionality is very limited
|
||||
*/
|
||||
$sWhere = "";
|
||||
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
|
||||
{
|
||||
$sWhere = "WHERE (";
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
|
||||
}
|
||||
$sWhere = substr_replace( $sWhere, "", -3 );
|
||||
$sWhere .= ')';
|
||||
}
|
||||
|
||||
/* Individual column filtering */
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
if ( isset($_GET['bSearchable_'.$i]) && $_GET['bSearchable_'.$i] == "true" && $_GET['sSearch_'.$i] != '' )
|
||||
{
|
||||
if ( $sWhere == "" )
|
||||
{
|
||||
$sWhere = "WHERE ";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sWhere .= " AND ";
|
||||
}
|
||||
$iColumnIndex = array_search( $_GET['mDataProp_'.$i], $aColumns );
|
||||
$sWhere .= $aColumns[$iColumnIndex]." LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SQL queries
|
||||
* Get data to display
|
||||
*/
|
||||
$sQuery = "
|
||||
SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
|
||||
FROM $sTable
|
||||
$sWhere
|
||||
$sOrder
|
||||
$sLimit
|
||||
";
|
||||
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
|
||||
/* Data set length after filtering */
|
||||
$sQuery = "
|
||||
SELECT FOUND_ROWS()
|
||||
";
|
||||
$rResultFilterTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
$aResultFilterTotal = mysql_fetch_array($rResultFilterTotal);
|
||||
$iFilteredTotal = $aResultFilterTotal[0];
|
||||
|
||||
/* Total data set length */
|
||||
$sQuery = "
|
||||
SELECT COUNT(".$sIndexColumn.")
|
||||
FROM $sTable
|
||||
";
|
||||
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
$aResultTotal = mysql_fetch_array($rResultTotal);
|
||||
$iTotal = $aResultTotal[0];
|
||||
|
||||
|
||||
/*
|
||||
* Output
|
||||
*/
|
||||
$output = array(
|
||||
"sEcho" => intval($_GET['sEcho']),
|
||||
"iTotalRecords" => $iTotal,
|
||||
"iTotalDisplayRecords" => $iFilteredTotal,
|
||||
"aaData" => array()
|
||||
);
|
||||
|
||||
while ( $aRow = mysql_fetch_array( $rResult ) )
|
||||
{
|
||||
$row = array();
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
if ( $aColumns[$i] == "version" )
|
||||
{
|
||||
/* Special output formatting for 'version' column */
|
||||
$row[ $aColumns[$i] ] = ($aRow[ $aColumns[$i] ]=="0") ? '-' : $aRow[ $aColumns[$i] ];
|
||||
}
|
||||
else if ( $aColumns[$i] != ' ' )
|
||||
{
|
||||
/* General output */
|
||||
$row[ $aColumns[$i] ] = $aRow[ $aColumns[$i] ];
|
||||
}
|
||||
}
|
||||
$output['aaData'][] = $row;
|
||||
}
|
||||
|
||||
echo $_GET['callback'].'('.json_encode( $output ).');';
|
||||
?>
|
||||
@@ -61,8 +61,8 @@
|
||||
{
|
||||
if ( $_GET[ 'bSortable_'.intval($_GET['iSortCol_'.$i]) ] == "true" )
|
||||
{
|
||||
$sOrder .= $aColumns[ intval( $_GET['iSortCol_'.$i] ) ]."
|
||||
".mysql_real_escape_string( $_GET['sSortDir_'.$i] ) .", ";
|
||||
$sOrder .= "`".$aColumns[ intval( $_GET['iSortCol_'.$i] ) ]."` ".
|
||||
mysql_real_escape_string( $_GET['sSortDir_'.$i] ) .", ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
$sWhere = "WHERE (";
|
||||
for ( $i=0 ; $i<count($aColumns) ; $i++ )
|
||||
{
|
||||
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
|
||||
$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string( $_GET['sSearch'] )."%' OR ";
|
||||
}
|
||||
$sWhere = substr_replace( $sWhere, "", -3 );
|
||||
$sWhere .= ')';
|
||||
@@ -105,7 +105,7 @@
|
||||
{
|
||||
$sWhere .= " AND ";
|
||||
}
|
||||
$sWhere .= $aColumns[$i]." LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
|
||||
$sWhere .= "`".$aColumns[$i]."` LIKE '%".mysql_real_escape_string($_GET['sSearch_'.$i])."%' ";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,12 +115,12 @@
|
||||
* Get data to display
|
||||
*/
|
||||
$sQuery = "
|
||||
SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
|
||||
SELECT SQL_CALC_FOUND_ROWS `".str_replace(" , ", " ", implode("`, `", $aColumns))."`
|
||||
FROM $sTable
|
||||
$sWhere
|
||||
$sOrder
|
||||
$sLimit
|
||||
";
|
||||
";
|
||||
$rResult = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
|
||||
/* Data set length after filtering */
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
/* Total data set length */
|
||||
$sQuery = "
|
||||
SELECT COUNT(".$sIndexColumn.")
|
||||
SELECT COUNT(`".$sIndexColumn."`)
|
||||
FROM $sTable
|
||||
";
|
||||
$rResultTotal = mysql_query( $sQuery, $gaSql['link'] ) or die(mysql_error());
|
||||
|
||||
@@ -85,7 +85,7 @@ $(document).ready(function() {
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
var aSelected = [];
|
||||
|
||||
/* Init the table */
|
||||
@@ -115,6 +115,14 @@ $(document).ready(function() {
|
||||
$(this).toggleClass('row_selected');
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
|
||||
<h1>Other examples</h1>
|
||||
@@ -129,6 +137,7 @@ $(document).ready(function() {
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -147,7 +156,7 @@ $(document).ready(function() {
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -161,6 +170,7 @@ $(document).ready(function() {
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -63,14 +63,21 @@
|
||||
|
||||
|
||||
<h1>Initialisation code</h1>
|
||||
<pre>$(document).ready(function() {
|
||||
<pre class="brush: js;">$(document).ready(function() {
|
||||
$('#example').dataTable( {
|
||||
"bProcessing": true,
|
||||
"bServerSide": true,
|
||||
"sAjaxSource": "scripts/server_processing.php"
|
||||
} );
|
||||
} );</pre>
|
||||
<style type="text/css">
|
||||
@import "../examples_support/syntax/css/shCore.css";
|
||||
</style>
|
||||
<script type="text/javascript" language="javascript" src="../examples_support/syntax/js/shCore.js"></script>
|
||||
|
||||
<h1>Server response</h1>
|
||||
<p>The code below shows the latest JSON data that has been returned from the server in response to the Ajax request made by DataTables. This will update as further requests are made.</p>
|
||||
<pre id="latest_xhr" class="brush: js;"></pre>
|
||||
|
||||
<h1>Server side (PHP) code</h1>
|
||||
<pre><?php
|
||||
@@ -263,6 +270,7 @@
|
||||
<li><a href="../basic_init/hidden_columns.html">Hidden columns</a></li>
|
||||
<li><a href="../basic_init/complex_header.html">Complex headers - grouping with 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 styles</a></li>
|
||||
<li>Scrolling: <br>
|
||||
@@ -281,7 +289,7 @@
|
||||
<li>Events: <br>
|
||||
<a href="../advanced_init/events_live.html">Live events</a> /
|
||||
<a href="../advanced_init/events_pre_init.html">Pre-init</a> /
|
||||
<a href="../advanced_init/events_post_init.html">Post-init with fnGetNodes</a>
|
||||
<a href="../advanced_init/events_post_init.html">Post-init</a>
|
||||
</li>
|
||||
<li><a href="../advanced_init/column_render.html">Column rendering</a></li>
|
||||
<li><a href="../advanced_init/html_sort.html">Sorting without HTML tags</a></li>
|
||||
@@ -295,6 +303,7 @@
|
||||
<li><a href="../advanced_init/footer_callback.html">Footer callback</a></li>
|
||||
<li><a href="../advanced_init/sorting_control.html">Control sorting direction of columns</a></li>
|
||||
<li><a href="../advanced_init/language_file.html">Change language information from a file (internationalisation)</a></li>
|
||||
<li><a href="../advanced_init/defaults.html">Setting defaults</a></li>
|
||||
</ul>
|
||||
|
||||
<h2>API</h2>
|
||||
|
||||
@@ -71,34 +71,60 @@
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
width: 44px;
|
||||
* width: 50px;
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Pagination nested */
|
||||
.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next {
|
||||
.paginate_disabled_previous, .paginate_enabled_previous,
|
||||
.paginate_disabled_next, .paginate_enabled_next {
|
||||
height: 19px;
|
||||
width: 19px;
|
||||
margin-left: 3px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #111 !important;
|
||||
}
|
||||
.paginate_disabled_previous:hover, .paginate_enabled_previous:hover,
|
||||
.paginate_disabled_next:hover, .paginate_enabled_next:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.paginate_disabled_previous:active, .paginate_enabled_previous:active,
|
||||
.paginate_disabled_next:active, .paginate_enabled_next:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous,
|
||||
.paginate_disabled_next {
|
||||
color: #666 !important;
|
||||
}
|
||||
.paginate_disabled_previous, .paginate_enabled_previous {
|
||||
padding-left: 23px;
|
||||
}
|
||||
.paginate_disabled_next, .paginate_enabled_next {
|
||||
padding-right: 23px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.paginate_disabled_previous {
|
||||
background-image: url('../images/back_disabled.jpg');
|
||||
background: url('../images/back_disabled.png') no-repeat top left;
|
||||
}
|
||||
|
||||
.paginate_enabled_previous {
|
||||
background-image: url('../images/back_enabled.jpg');
|
||||
background: url('../images/back_enabled.png') no-repeat top left;
|
||||
}
|
||||
.paginate_enabled_previous:hover {
|
||||
background: url('../images/back_enabled_hover.png') no-repeat top left;
|
||||
}
|
||||
|
||||
.paginate_disabled_next {
|
||||
background-image: url('../images/forward_disabled.jpg');
|
||||
background: url('../images/forward_disabled.png') no-repeat top right;
|
||||
}
|
||||
|
||||
.paginate_enabled_next {
|
||||
background-image: url('../images/forward_enabled.jpg');
|
||||
background: url('../images/forward_enabled.png') no-repeat top right;
|
||||
}
|
||||
.paginate_enabled_next:hover {
|
||||
background: url('../images/forward_enabled_hover.png') no-repeat top right;
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +202,10 @@ table.display td.center {
|
||||
.sorting_desc_disabled {
|
||||
background: url('../images/sort_desc_disabled.png') no-repeat center right;
|
||||
}
|
||||
|
||||
|
||||
th:active {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -290,8 +319,8 @@ td.details {
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button,
|
||||
.paging_full_numbers span.paginate_active {
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
@@ -299,17 +328,19 @@ td.details {
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button {
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button:hover {
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_active {
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
* cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.dataTables_paginate .ui-button {
|
||||
@@ -341,8 +342,8 @@ td.details {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button,
|
||||
.paging_full_numbers span.paginate_active {
|
||||
.paging_full_numbers a.paginate_button,
|
||||
.paging_full_numbers a.paginate_active {
|
||||
border: 1px solid #aaa;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
@@ -350,17 +351,19 @@ td.details {
|
||||
margin: 0 3px;
|
||||
cursor: pointer;
|
||||
*cursor: hand;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button {
|
||||
.paging_full_numbers a.paginate_button {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_button:hover {
|
||||
.paging_full_numbers a.paginate_button:hover {
|
||||
background-color: #ccc;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.paging_full_numbers span.paginate_active {
|
||||
.paging_full_numbers a.paginate_active {
|
||||
background-color: #99B3FF;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 612 B |
BIN
media/images/back_disabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 807 B |
BIN
media/images/back_enabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
media/images/back_enabled_hover.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 635 B |
BIN
media/images/forward_disabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 852 B |
BIN
media/images/forward_enabled.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |