annotate DataTables-1.9.4/docs/DataTable.defaults.html @ 7:0f2b740536fb draft

Uploaded
author saskia-hiltemann
date Mon, 21 Aug 2017 09:16:07 -0400
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2 <html>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 <head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4 <meta http-equiv="Content-type" content="text/html; charset=utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 <title>Namespace: defaults - documentation</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <style type="text/css" media="screen">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 @import "media/css/doc.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 @import "media/css/shCore.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 @import "media/css/shThemeDataTables.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 <script type="text/javascript" src="media/js/shCore.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <script type="text/javascript" src="media/js/shBrushJScript.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <script type="text/javascript" src="media/js/jquery.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 <script type="text/javascript" src="media/js/doc.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 <body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 <div class="fw_container">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 <a name="top"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 <div class="fw_header">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 <h1 class="page-title">Namespace: defaults</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 <h2 class="ancestors">Ancestry: <span class="ancestors"><a href="DataTable.html">DataTable</a>.</span> ยป defaults</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 <div class="page-info">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 DataTables v1.9.4 documentation
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 <div class="fw_nav">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 <h2>Navigation</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 <li><a href="#top">Overview</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 <li><a href="#summary">Summary</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Classes (0)</td><td><a href="#summary_namespaces">Namespaces (3)</a></td></tr><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (58)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li><li><a href="#details">Details</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (58)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li></ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 <div style="margin-top: 10px;">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 <input type="hidden" name="show_private" value="0">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 <span id="private_label">Hiding</span> private elements
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 (<a id="private_toggle" href="">toggle</a>)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 </span>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 <div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 <input type="hidden" name="show_extended" value="1">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <span id="extended_label">Showing</span> extended elements
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 (<a id="extended_toggle" href="">toggle</a>)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 </span>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 <div class="fw_content">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 <a name="overview"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 <div class="doc_overview">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 <div class="nav_blocker"></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 <p>Initialisation options that can be given to DataTables at initialisation
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 time.</p><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 <div class="doc_summary">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 <a name="summary"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 <h2>Summary</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 <div class="doc_group"><a name="summary_namespaces"></a><h3 class="subsection-title">Namespaces</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69 <dt class="even"><span class="type-name"><a href="DataTable.defaults.columns.html">columns</a></span></dt><dd class="even"><p>Column options that can be given to DataTables at initialisation time.</p></dd><dt class="odd"><span class="type-name"><a href="DataTable.defaults.oLanguage.html">oLanguage</a></span></dt><dd class="odd"><p>All strings that DataTables uses in the user interface that it creates
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 are defined in this object, allowing you to modified them individually or
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 completely replace them all as required.</p></dd><dt class="even"><span class="type-name"><a href="DataTable.defaults.oSearch.html">oSearch</a></span></dt><dd class="even"><p>This parameter allows you to have define the global filtering state at
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 initialisation time. As an object the "sSearch" parameter must be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 defined, but all other parameters are optional. When "bRegex" is true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 the search string will be treated as a regular expression, when false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 (default) it will be treated as a straight string. When "bSmart"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 DataTables will use it's smart filtering methods (to word match at
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 any point in the data), when false this will not be done.</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 </dl></div><div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 <dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaData">aaData</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>An array of data to use for the table, passed in at initialisation which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 will be used in preference to any data which is already in the DOM. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 particularly useful for constructing tables purely in Javascript, for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 example with a custom Ajax call.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaSorting">aaSorting</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>If sorting is enabled, then DataTables will perform a first pass sort on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 initialisation. You can define which column(s) the sort is performed upon,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 and the sorting direction, with this variable. The aaSorting array should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 contain an array for each column to be sorted initially containing the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 column's index and a direction string ('asc' or 'desc').</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaSortingFixed">aaSortingFixed</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>This parameter is basically identical to the aaSorting parameter, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 cannot be overridden by user interaction with the table. What this means
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 is that you could have a column (visible or hidden) which the sorting will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 always be forced on first - any sorting after that (from the user) will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 then be performed as required. This can be useful for grouping rows
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 together.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aLengthMenu">aLengthMenu</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>This parameter allows you to readily specify the entries in the length drop
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 down menu that DataTables shows when pagination is enabled. It can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95 either a 1D array of options which will be used for both the displayed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96 option and the value, or a 2D array which will use the array in the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97 position as the value, and the array in the second position as the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 displayed options (useful for language strings such as 'All').</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoColumnDefs">aoColumnDefs</a></span><span class="type-sig"><span class="type-signature"></span></span></dt><dd class=" even"><p>Very similar to aoColumns, aoColumnDefs allows you to target a specific
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99 column, multiple columns, or all columns, using the aTargets property of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100 each object in the array. This allows great flexibility when creating
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 tables, as the aoColumnDefs arrays can be of any length, targeting the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 columns you specifically want. aoColumnDefs may use any of the column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 options available: <a href="DataTable.defaults.columns.html">DataTable.defaults.columns</a>, but it <em>must</em>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 have aTargets defined in each object in the array. Values in the aTargets
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 array may be:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 <li>a string - class name will be matched on the TH for the column</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 <li>0 or a positive integer - column index counting from the left</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 <li>a negative integer - column index counting from the right</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
110 <li>the string "_all" - all columns (i.e. assign a default)</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
111 </ul></p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoColumns">aoColumns</a></span><span class="type-sig"><span class="type-signature"></span></span></dt><dd class=" odd"><p>The aoColumns option in the initialisation parameter allows you to define
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
112 details about the way individual columns behave. For a full list of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
113 column options that can be set, please see
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
114 <a href="DataTable.defaults.columns.html">DataTable.defaults.columns</a>. Note that if you use aoColumns to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
115 define your columns, you must have an entry in the array for every single
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
116 column that you have in your table (these can be null if you don't which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
117 to specify any options).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoSearchCols">aoSearchCols</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>Basically the same as oSearch, this parameter defines the individual column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
118 filtering state at initialisation time. The array must be of the same size
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
119 as the number of columns, and each element be an object with the parameters
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
120 "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
121 accepted and the default will be used.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#asStripeClasses">asStripeClasses</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>An array of CSS classes that should be applied to displayed rows. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
122 array may be of any length, and DataTables will apply each class
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
123 sequentially, looping when required.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bAutoWidth">bAutoWidth</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable automatic column width calculation. This can be disabled
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
124 as an optimisation (it takes some time to calculate the widths) if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
125 tables widths are passed in using aoColumns.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bDeferRender">bDeferRender</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Deferred rendering can provide DataTables with a huge speed boost when you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
126 are using an Ajax or JS data source for the table. This option, when set to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
127 true, will cause DataTables to defer the creation of the table elements for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
128 each row until they are needed for a draw - saving a significant amount of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
129 time.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bDestroy">bDestroy</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Replace a DataTable which matches the given selector and replace it with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
130 one which has the properties of the new initialisation object passed. If no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
131 table matches the selector, then the new DataTable will be constructed as
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
132 per normal.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bFilter">bFilter</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable filtering of data. Filtering in DataTables is "smart" in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
133 that it allows the end user to input multiple words (space separated) and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
134 will match a row containing those words, even if not in the order that was
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
135 specified (this allow matching across multiple columns). Note that if you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
136 wish to use filtering in DataTables this must remain 'true' - to remove the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
137 default filtering input box and retain filtering abilities, please use
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
138 <a href="DataTable.defaults.html#sDom">DataTable.defaults.sDom</a>.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bInfo">bInfo</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the table information display. This shows information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
139 about the data that is currently visible on the page, including information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
140 about filtered data if that action is being performed.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bJQueryUI">bJQueryUI</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
141 slightly different and additional mark-up from what DataTables has
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
142 traditionally used).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bLengthChange">bLengthChange</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Allows the end user to select the size of a formatted page from a select
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
143 menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bPaginate">bPaginate</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable pagination.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bProcessing">bProcessing</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the display of a 'processing' indicator when the table is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
144 being processed (e.g. a sort). This is particularly useful for tables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
145 large amounts of data where it can take a noticeable amount of time to sort
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
146 the entries.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bRetrieve">bRetrieve</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Retrieve the DataTables object for the given selector. Note that if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
147 table has already been initialised, this parameter will cause DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
148 to simply return the object that has already been set up - it will not take
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
149 account of any changes you might have made to the initialisation object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
150 passed to DataTables (setting this parameter to true is an acknowledgement
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
151 that you understand this). bDestroy can be used to reinitialise a table if
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
152 you need.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollAutoCss">bScrollAutoCss</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Indicate if DataTables should be allowed to set the padding / margin
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
153 etc for the scrolling header elements or not. Typically you will want
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
154 this.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollCollapse">bScrollCollapse</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>When vertical (y) scrolling is enabled, DataTables will force the height of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
155 the table's viewport to the given height at all times (useful for layout).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
156 However, this can look odd when filtering data down to a small data set,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
157 and the footer is left "floating" further down. This parameter (when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
158 enabled) will cause DataTables to collapse the table's viewport down when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
159 the result set will fit within the given Y height.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollInfinite">bScrollInfinite</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable infinite scrolling for DataTables (to be used in combination with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
160 sScrollY). Infinite scrolling means that DataTables will continually load
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
161 data as a user scrolls through a table, which is very useful for large
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
162 dataset. This cannot be used with pagination, which is automatically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
163 disabled. Note - the Scroller extra for DataTables is recommended in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
164 in preference to this option.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bServerSide">bServerSide</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Configure DataTables to use server-side processing. Note that the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
165 sAjaxSource parameter must also be given in order to give DataTables a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
166 source to obtain the required data for each draw.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSort">bSort</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable sorting of columns. Sorting of individual columns can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
167 disabled by the "bSortable" option for each column.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSortCellsTop">bSortCellsTop</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Allows control over whether DataTables should use the top (true) unique
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
168 cell that is found for a single column, or the bottom (false - default).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
169 This is useful when using complex headers.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSortClasses">bSortClasses</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
170 'sorting_3' to the columns which are currently being sorted on. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
171 presented as a feature switch as it can increase processing time (while
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
172 classes are removed and added) so for large data sets you might want to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
173 turn this off.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bStateSave">bStateSave</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable state saving. When enabled a cookie will be used to save
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
174 table display information such as pagination information, display length,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
175 filtering and sorting. As such when the end user reloads the page the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
176 display display will match what thy had previously set up.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnCookieCallback">fnCookieCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Customise the cookie and / or the parameters being stored when using
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
177 DataTables with state saving enabled. This function is called whenever
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
178 the cookie is modified, and it expects a fully formed cookie string to be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
179 returned. Note that the data object passed in is a Javascript object which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
180 must be converted to a string (JSON.stringify for example).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnCreatedRow">fnCreatedRow</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>This function is called when a TR element is created (and all TD child
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
181 elements have been inserted), or registered if using a DOM source, allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
182 manipulation of the TR element (adding classes etc).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnDrawCallback">fnDrawCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
183 dynamically modify any aspect you want about the created DOM.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnFooterCallback">fnFooterCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Identical to fnHeaderCallback() but for the table footer this function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
184 allows you to modify the table footer on every 'draw' even.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnFormatNumber">fnFormatNumber</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>When rendering large numbers in the information element for the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
185 (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
186 to have a comma separator for the 'thousands' units (e.g. 1 million is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
187 rendered as "1,000,000") to help readability for the end user. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
188 function will override the default method DataTables uses.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnHeaderCallback">fnHeaderCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
189 dynamically modify the header row. This can be used to calculate and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
190 display useful information about the table.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnInfoCallback">fnInfoCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>The information element can be used to convey information about the current
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
191 state of the table. Although the internationalisation options presented by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
192 DataTables are quite capable of dealing with most customisations, there may
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
193 be times where you wish to customise the string further. This callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
194 allows you to do exactly that.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnInitComplete">fnInitComplete</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Called when the table has been initialised. Normally DataTables will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
195 initialise sequentially and there will be no need for this function,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
196 however, this does not hold true when using external language information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
197 since that is obtained using an async XHR call.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnPreDrawCallback">fnPreDrawCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Called at the very start of each table draw and can be used to cancel the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
198 draw by returning false, any other return (including undefined) results in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
199 the full draw occurring).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnRowCallback">fnRowCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>This function allows you to 'post process' each row after it have been
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
200 generated for each table draw, but before it is rendered on screen. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
201 function might be used for setting the row class name etc.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnServerData">fnServerData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>This parameter allows you to override the default function which obtains
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
202 the data from the server ($.getJSON) so something more suitable for your
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
203 application. For example you could use POST data, or pull information from
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
204 a Gears or AIR database.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnServerParams">fnServerParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>It is often useful to send extra data to the server when making an Ajax
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
205 request - for example custom filtering information, and this callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
206 function makes it trivial to send extra information to the server. The
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
207 passed in parameter is the data set that has been constructed by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
208 DataTables, and you can add to this or modify it as you require.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnStateLoad">fnStateLoad</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Load the table state. With this function you can define from where, and how, the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
209 state of a table is loaded. By default DataTables will load from its state saving
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
210 cookie, but you might wish to use local storage (HTML5) or a server-side database.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnStateLoaded">fnStateLoaded</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Callback that is called when the state has been loaded from the state saving method
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
211 and the DataTables settings object has been modified as a result of the loaded state.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnStateLoadParams">fnStateLoadParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Callback which allows modification of the saved state prior to loading that state.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
212 This callback is called when the table is loading state from the stored data, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
213 prior to the settings object being modified by the saved state. Note that for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
214 plug-in authors, you should use the 'stateLoadParams' event to load parameters for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
215 a plug-in.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnStateSave">fnStateSave</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" odd"><p>Save the table state. This function allows you to define where and how the state
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
216 information for the table is stored - by default it will use a cookie, but you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
217 might want to use local storage (HTML5) or a server-side database.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnStateSaveParams">fnStateSaveParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class=" even"><p>Callback which allows modification of the state to be saved. Called when the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
218 has changed state a new state save is required. This method allows modification of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
219 the state saving object prior to actually doing the save, including addition or
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
220 other state properties or modification. Note that for plug-in authors, you should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
221 use the 'stateSaveParams' event to save parameters for a plug-in.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iCookieDuration">iCookieDuration</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>Duration of the cookie which is used for storing session information. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
222 value is given in seconds.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDeferLoading">iDeferLoading</a></span><span class="type-sig"><span class="type-signature"> :int|array</span></span></dt><dd class=" even"><p>When enabled DataTables will not make a request to the server for the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
223 page draw - rather it will use the data already on the page (no sorting etc
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
224 will be applied to it), thus saving on an XHR at load time. iDeferLoading
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
225 is used to indicate that deferred loading is required, but it is also used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
226 to tell DataTables how many records there are in the full table (allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
227 the information element and pagination to be displayed correctly). In the case
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
228 where a filtering is applied to the table on initial load, this can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
229 indicated by giving the parameter as an array, where the first element is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
230 the number of records available after filtering and the second element is the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
231 number of records without filtering (allowing the table information element
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
232 to be shown correctly).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDisplayLength">iDisplayLength</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>Number of rows to display on a single page when using pagination. If
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
233 feature enabled (bLengthChange) then the end user will be able to override
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
234 this to a custom setting using a pop-up menu.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDisplayStart">iDisplayStart</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>Define the starting point for data display when using DataTables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
235 pagination. Note that this parameter is the number of records, rather than
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
236 the page number, so if you have 10 records per page and want to start on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
237 the third page, it should be "20".</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iScrollLoadGap">iScrollLoadGap</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>The scroll gap is the amount of scrolling that is left to go before
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
238 DataTables will load the next 'page' of data automatically. You typically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
239 want a gap which is big enough that the scrolling will be smooth for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
240 user, while not so large that it will load more data than need.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iTabIndex">iTabIndex</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>By default DataTables allows keyboard navigation of the table (sorting, paging,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
241 and filtering) by adding a tabindex attribute to the required elements. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
242 allows you to tab through the controls and press the enter key to activate them.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
243 The tabindex is default 0, meaning that the tab follows the flow of the document.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
244 You can overrule this using this parameter if you wish. Use a value of -1 to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
245 disable built-in keyboard navigation.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sAjaxDataProp">sAjaxDataProp</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>By default DataTables will look for the property 'aaData' when obtaining
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
246 data from an Ajax source or for server-side processing - this parameter
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
247 allows that property to be changed. You can use Javascript dotted object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
248 notation to get a data source for multiple levels of nesting.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sAjaxSource">sAjaxSource</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>You can instruct DataTables to load data from an external source using this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
249 parameter (use aData if you want to pass data in you already have). Simply
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
250 provide a url a JSON object can be obtained from. This object must include
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
251 the parameter 'aaData' which is the data source for the table.</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sCookiePrefix">sCookiePrefix</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>This parameter can be used to override the default prefix that DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
252 assigns to a cookie when state saving is enabled.</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sDom">sDom</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>This initialisation variable allows you to specify exactly where in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
253 DOM you want DataTables to inject the various controls it adds to the page
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
254 (for example you might want the pagination controls at the top of the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
255 table). DIV elements (with or without a custom class) can also be added to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
256 aid styling. The follow syntax is used:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
257 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
258 <li>The following options are allowed: <br />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
259 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
260 <li>'l' - Length changing</li
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
261 <li>'f' - Filtering input</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
262 <li>'t' - The table!</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
263 <li>'i' - Information</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
264 <li>'p' - Pagination</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
265 <li>'r' - pRocessing</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
266 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
267 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
268 <li>The following constants are allowed:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
269 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
270 <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
271 <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
272 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
273 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
274 <li>The following syntax is expected:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
275 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
276 <li>'&lt;' and '&gt;' - div elements</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
277 <li>'&lt;"class" and '&gt;' - div with a class</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
278 <li>'&lt;"#id" and '&gt;' - div with an ID</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
279 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
280 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
281 <li>Examples:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
282 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
283 <li>'&lt;"wrapper"flipt&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
284 <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
285 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
286 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
287 </ul></p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sPaginationType">sPaginationType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>DataTables features two different built-in pagination interaction methods
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
288 ('two_button' or 'full_numbers') which present different page controls to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
289 the end user. Further methods can be added using the API (see below).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollX">sScrollX</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Enable horizontal scrolling. When a table is too wide to fit into a certain
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
290 layout, or you have a large number of columns in the table, you can enable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
291 x-scrolling to show the table in a viewport, which can be scrolled. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
292 property can be any CSS unit, or a number (in which case it will be treated
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
293 as a pixel measurement).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollXInner">sScrollXInner</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>This property can be used to force a DataTable to use more width than it
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
294 might otherwise do when x-scrolling is enabled. For example if you have a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
295 table which requires to be well spaced, this parameter is useful for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
296 "over-sizing" the table, and thus forcing scrolling. This property can by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
297 any CSS unit, or a number (in which case it will be treated as a pixel
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
298 measurement).</p></dd><dt class=" even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollY">sScrollY</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Enable vertical scrolling. Vertical scrolling will constrain the DataTable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
299 to the given height, and enable scrolling for any data which overflows the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
300 current viewport. This can be used as an alternative to paging to display
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
301 a lot of data in a small area (although paging and scrolling can both be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
302 enabled at the same time). This property can be any CSS unit, or a number
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
303 (in which case it will be treated as a pixel measurement).</p></dd><dt class=" odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sServerMethod">sServerMethod</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Set the HTTP method that is used to make the Ajax call for server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
304 processing or Ajax sourced data.</p></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
305 </dl></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
306 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
307
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
308
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
309
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
310
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
311 <div class="doc_details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
312 <a name="details"></a>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
313 <h2>Details</h2>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
314 <div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
315 <dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
316 <dt class=" even"><a name="aaData"></a><a name="aaData_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaData">aaData</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>An array of data to use for the table, passed in at initialisation which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
317 will be used in preference to any data which is already in the DOM. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
318 particularly useful for constructing tables purely in Javascript, for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
319 example with a custom Ajax call.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
320
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
321 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
322 <h5>Examples</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
323 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
324 <pre class="brush: js"> // Using a 2D array data source
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
325 $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
326 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
327 "aaData": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
328 ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
329 ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
330 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
331 "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
332 { "sTitle": "Engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
333 { "sTitle": "Browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
334 { "sTitle": "Platform" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
335 { "sTitle": "Version" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
336 { "sTitle": "Grade" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
337 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
338 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
339 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
340
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
341 </pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
342 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
343
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
344 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
345 <pre class="brush: js"> // Using an array of objects as a data source (mData)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
346 $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
347 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
348 "aaData": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
349 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
350 "engine": "Trident",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
351 "browser": "Internet Explorer 4.0",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
352 "platform": "Win 95+",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
353 "version": 4,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
354 "grade": "X"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
355 },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
356 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
357 "engine": "Trident",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
358 "browser": "Internet Explorer 5.0",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
359 "platform": "Win 95+",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
360 "version": 5,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
361 "grade": "C"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
362 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
363 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
364 "aoColumns": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
365 { "sTitle": "Engine", "mData": "engine" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
366 { "sTitle": "Browser", "mData": "browser" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
367 { "sTitle": "Platform", "mData": "platform" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
368 { "sTitle": "Version", "mData": "version" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
369 { "sTitle": "Grade", "mData": "grade" }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
370 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
371 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
372 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
373 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
374 </div></dd><dt class=" odd"><a name="aaSorting"></a><a name="aaSorting_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaSorting">aaSorting</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>If sorting is enabled, then DataTables will perform a first pass sort on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
375 initialisation. You can define which column(s) the sort is performed upon,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
376 and the sorting direction, with this variable. The aaSorting array should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
377 contain an array for each column to be sorted initially containing the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
378 column's index and a direction string ('asc' or 'desc').</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
379
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
380 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
381 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
382 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
383 <pre class="brush: js"> // Sort by 3rd column first, and then 4th column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
384 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
385 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
386 "aaSorting": [[2,'asc'], [3,'desc']]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
387 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
388 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
389
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
390 // No initial sorting
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
391 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
392 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
393 "aaSorting": []
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
394 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
395 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
396 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
397 </div></dd><dt class=" even"><a name="aaSortingFixed"></a><a name="aaSortingFixed_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aaSortingFixed">aaSortingFixed</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>This parameter is basically identical to the aaSorting parameter, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
398 cannot be overridden by user interaction with the table. What this means
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
399 is that you could have a column (visible or hidden) which the sorting will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
400 always be forced on first - any sorting after that (from the user) will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
401 then be performed as required. This can be useful for grouping rows
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
402 together.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
403
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
404 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
405 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
406 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
407 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
408 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
409 "aaSortingFixed": [[0,'asc']]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
410 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
411 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
412 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
413 </div></dd><dt class=" odd"><a name="aLengthMenu"></a><a name="aLengthMenu_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aLengthMenu">aLengthMenu</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>This parameter allows you to readily specify the entries in the length drop
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
414 down menu that DataTables shows when pagination is enabled. It can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
415 either a 1D array of options which will be used for both the displayed
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
416 option and the value, or a 2D array which will use the array in the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
417 position as the value, and the array in the second position as the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
418 displayed options (useful for language strings such as 'All').</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
419
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
420 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
421 <h5>Examples</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
422 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
423 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
424 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
425 "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
426 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
427 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
428
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
429 </pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
430 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
431
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
432 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
433 <pre class="brush: js"> // Setting the default display length as well as length menu
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
434 // This is likely to be wanted if you remove the '10' option which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
435 // is the iDisplayLength default.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
436 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
437 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
438 "iDisplayLength": 25,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
439 "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
440 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
441 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
442 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
443 </div></dd><dt class=" even"><a name="aoColumnDefs"></a><a name="aoColumnDefs_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoColumnDefs">aoColumnDefs</a></span><span class="type-sig"><span class="type-signature"></span></span></dt><dd class=" even"><p>Very similar to aoColumns, aoColumnDefs allows you to target a specific
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
444 column, multiple columns, or all columns, using the aTargets property of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
445 each object in the array. This allows great flexibility when creating
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
446 tables, as the aoColumnDefs arrays can be of any length, targeting the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
447 columns you specifically want. aoColumnDefs may use any of the column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
448 options available: <a href="DataTable.defaults.columns.html">DataTable.defaults.columns</a>, but it <em>must</em>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
449 have aTargets defined in each object in the array. Values in the aTargets
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
450 array may be:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
451 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
452 <li>a string - class name will be matched on the TH for the column</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
453 <li>0 or a positive integer - column index counting from the left</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
454 <li>a negative integer - column index counting from the right</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
455 <li>the string "_all" - all columns (i.e. assign a default)</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
456 </ul></p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
457
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
458 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
459 </div></dd><dt class=" odd"><a name="aoColumns"></a><a name="aoColumns_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoColumns">aoColumns</a></span><span class="type-sig"><span class="type-signature"></span></span></dt><dd class=" odd"><p>The aoColumns option in the initialisation parameter allows you to define
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
460 details about the way individual columns behave. For a full list of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
461 column options that can be set, please see
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
462 <a href="DataTable.defaults.columns.html">DataTable.defaults.columns</a>. Note that if you use aoColumns to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
463 define your columns, you must have an entry in the array for every single
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
464 column that you have in your table (these can be null if you don't which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
465 to specify any options).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
466
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
467 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
468 </div></dd><dt class=" even"><a name="aoSearchCols"></a><a name="aoSearchCols_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoSearchCols">aoSearchCols</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" even"><p>Basically the same as oSearch, this parameter defines the individual column
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
469 filtering state at initialisation time. The array must be of the same size
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
470 as the number of columns, and each element be an object with the parameters
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
471 "sSearch" and "bEscapeRegex" (the latter is optional). 'null' is also
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
472 accepted and the default will be used.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
473
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
474 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
475 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
476 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
477 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
478 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
479 "aoSearchCols": [
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
480 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
481 { "sSearch": "My filter" },
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
482 null,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
483 { "sSearch": "^[0-9]", "bEscapeRegex": false }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
484 ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
485 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
486 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
487 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
488 </div></dd><dt class=" odd"><a name="asStripeClasses"></a><a name="asStripeClasses_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#asStripeClasses">asStripeClasses</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class=" odd"><p>An array of CSS classes that should be applied to displayed rows. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
489 array may be of any length, and DataTables will apply each class
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
490 sequentially, looping when required.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
491
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
492 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
493 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
494 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
495 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
496 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
497 "asStripeClasses": [ 'strip1', 'strip2', 'strip3' ]
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
498 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
499 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
500 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
501 </div></dd><dt class=" even"><a name="bAutoWidth"></a><a name="bAutoWidth_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bAutoWidth">bAutoWidth</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable automatic column width calculation. This can be disabled
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
502 as an optimisation (it takes some time to calculate the widths) if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
503 tables widths are passed in using aoColumns.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
504
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
505 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
506 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
507 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
508 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
509 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
510 "bAutoWidth": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
511 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
512 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
513 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
514 </div></dd><dt class=" odd"><a name="bDeferRender"></a><a name="bDeferRender_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bDeferRender">bDeferRender</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Deferred rendering can provide DataTables with a huge speed boost when you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
515 are using an Ajax or JS data source for the table. This option, when set to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
516 true, will cause DataTables to defer the creation of the table elements for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
517 each row until they are needed for a draw - saving a significant amount of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
518 time.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
519
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
520 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
521 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
522 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
523 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
524 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
525 "sAjaxSource": "sources/arrays.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
526 "bDeferRender": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
527 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
528 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
529 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
530 </div></dd><dt class=" even"><a name="bDestroy"></a><a name="bDestroy_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bDestroy">bDestroy</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Replace a DataTable which matches the given selector and replace it with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
531 one which has the properties of the new initialisation object passed. If no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
532 table matches the selector, then the new DataTable will be constructed as
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
533 per normal.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
534
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
535 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
536 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
537 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
538 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
539 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
540 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
541 "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
542 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
543
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
544 // Some time later....
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
545 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
546 "bFilter": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
547 "bDestroy": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
548 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
549 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
550 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
551 </div></dd><dt class=" odd"><a name="bFilter"></a><a name="bFilter_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bFilter">bFilter</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable filtering of data. Filtering in DataTables is "smart" in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
552 that it allows the end user to input multiple words (space separated) and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
553 will match a row containing those words, even if not in the order that was
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
554 specified (this allow matching across multiple columns). Note that if you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
555 wish to use filtering in DataTables this must remain 'true' - to remove the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
556 default filtering input box and retain filtering abilities, please use
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
557 <a href="DataTable.defaults.html#sDom">DataTable.defaults.sDom</a>.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
558
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
559 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
560 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
561 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
562 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
563 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
564 "bFilter": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
565 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
566 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
567 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
568 </div></dd><dt class=" even"><a name="bInfo"></a><a name="bInfo_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bInfo">bInfo</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the table information display. This shows information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
569 about the data that is currently visible on the page, including information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
570 about filtered data if that action is being performed.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
571
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
572 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
573 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
574 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
575 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
576 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
577 "bInfo": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
578 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
579 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
580 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
581 </div></dd><dt class=" odd"><a name="bJQueryUI"></a><a name="bJQueryUI_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bJQueryUI">bJQueryUI</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
582 slightly different and additional mark-up from what DataTables has
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
583 traditionally used).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
584
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
585 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
586 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
587 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
588 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
589 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
590 "bJQueryUI": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
591 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
592 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
593 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
594 </div></dd><dt class=" even"><a name="bLengthChange"></a><a name="bLengthChange_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bLengthChange">bLengthChange</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Allows the end user to select the size of a formatted page from a select
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
595 menu (sizes are 10, 25, 50 and 100). Requires pagination (bPaginate).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
596
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
597 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
598 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
599 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
600 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
601 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
602 "bLengthChange": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
603 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
604 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
605 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
606 </div></dd><dt class=" odd"><a name="bPaginate"></a><a name="bPaginate_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bPaginate">bPaginate</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable pagination.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
607
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
608 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
609 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
610 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
611 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
612 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
613 "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
614 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
615 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
616 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
617 </div></dd><dt class=" even"><a name="bProcessing"></a><a name="bProcessing_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bProcessing">bProcessing</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the display of a 'processing' indicator when the table is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
618 being processed (e.g. a sort). This is particularly useful for tables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
619 large amounts of data where it can take a noticeable amount of time to sort
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
620 the entries.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
621
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
622 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
623 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
624 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
625 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
626 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
627 "bProcessing": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
628 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
629 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
630 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
631 </div></dd><dt class=" odd"><a name="bRetrieve"></a><a name="bRetrieve_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bRetrieve">bRetrieve</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Retrieve the DataTables object for the given selector. Note that if the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
632 table has already been initialised, this parameter will cause DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
633 to simply return the object that has already been set up - it will not take
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
634 account of any changes you might have made to the initialisation object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
635 passed to DataTables (setting this parameter to true is an acknowledgement
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
636 that you understand this). bDestroy can be used to reinitialise a table if
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
637 you need.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
638
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
639 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
640 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
641 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
642 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
643 initTable();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
644 tableActions();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
645 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
646
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
647 function initTable ()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
648 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
649 return $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
650 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
651 "bPaginate": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
652 "bRetrieve": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
653 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
654 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
655
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
656 function tableActions ()
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
657 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
658 var oTable = initTable();
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
659 // perform API operations with oTable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
660 }</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
661 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
662 </div></dd><dt class=" even"><a name="bScrollAutoCss"></a><a name="bScrollAutoCss_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollAutoCss">bScrollAutoCss</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Indicate if DataTables should be allowed to set the padding / margin
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
663 etc for the scrolling header elements or not. Typically you will want
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
664 this.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
665
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
666 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
667 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
668 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
669 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
670 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
671 "bScrollAutoCss": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
672 "sScrollY": "200px"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
673 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
674 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
675 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
676 </div></dd><dt class=" odd"><a name="bScrollCollapse"></a><a name="bScrollCollapse_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollCollapse">bScrollCollapse</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>When vertical (y) scrolling is enabled, DataTables will force the height of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
677 the table's viewport to the given height at all times (useful for layout).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
678 However, this can look odd when filtering data down to a small data set,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
679 and the footer is left "floating" further down. This parameter (when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
680 enabled) will cause DataTables to collapse the table's viewport down when
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
681 the result set will fit within the given Y height.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
682
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
683 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
684 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
685 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
686 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
687 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
688 "sScrollY": "200",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
689 "bScrollCollapse": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
690 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
691 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
692 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
693 </div></dd><dt class=" even"><a name="bScrollInfinite"></a><a name="bScrollInfinite_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bScrollInfinite">bScrollInfinite</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable infinite scrolling for DataTables (to be used in combination with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
694 sScrollY). Infinite scrolling means that DataTables will continually load
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
695 data as a user scrolls through a table, which is very useful for large
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
696 dataset. This cannot be used with pagination, which is automatically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
697 disabled. Note - the Scroller extra for DataTables is recommended in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
698 in preference to this option.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
699
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
700 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
701 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
702 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
703 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
704 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
705 "bScrollInfinite": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
706 "bScrollCollapse": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
707 "sScrollY": "200px"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
708 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
709 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
710 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
711 </div></dd><dt class=" odd"><a name="bServerSide"></a><a name="bServerSide_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bServerSide">bServerSide</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Configure DataTables to use server-side processing. Note that the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
712 sAjaxSource parameter must also be given in order to give DataTables a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
713 source to obtain the required data for each draw.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
714
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
715 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
716 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
717 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
718 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
719 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
720 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
721 "sAjaxSource": "xhr.php"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
722 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
723 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
724 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
725 </div></dd><dt class=" even"><a name="bSort"></a><a name="bSort_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSort">bSort</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable sorting of columns. Sorting of individual columns can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
726 disabled by the "bSortable" option for each column.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
727
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
728 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
729 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
730 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
731 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
732 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
733 "bSort": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
734 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
735 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
736 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
737 </div></dd><dt class=" odd"><a name="bSortCellsTop"></a><a name="bSortCellsTop_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSortCellsTop">bSortCellsTop</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Allows control over whether DataTables should use the top (true) unique
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
738 cell that is found for a single column, or the bottom (false - default).
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
739 This is useful when using complex headers.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
740
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
741 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
742 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
743 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
744 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
745 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
746 "bSortCellsTop": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
747 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
748 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
749 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
750 </div></dd><dt class=" even"><a name="bSortClasses"></a><a name="bSortClasses_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bSortClasses">bSortClasses</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" even"><p>Enable or disable the addition of the classes 'sorting_1', 'sorting_2' and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
751 'sorting_3' to the columns which are currently being sorted on. This is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
752 presented as a feature switch as it can increase processing time (while
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
753 classes are removed and added) so for large data sets you might want to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
754 turn this off.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
755
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
756 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
757 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
758 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
759 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
760 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
761 "bSortClasses": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
762 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
763 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
764 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
765 </div></dd><dt class=" odd"><a name="bStateSave"></a><a name="bStateSave_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#bStateSave">bStateSave</a></span><span class="type-sig"><span class="type-signature"> :boolean</span></span></dt><dd class=" odd"><p>Enable or disable state saving. When enabled a cookie will be used to save
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
766 table display information such as pagination information, display length,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
767 filtering and sorting. As such when the end user reloads the page the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
768 display display will match what thy had previously set up.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
769
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
770 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
771 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
772 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
773 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
774 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
775 "bStateSave": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
776 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
777 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
778 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
779 </div></dd><dt id="DataTable.defaults.fnCookieCallback" class=" even"><a name="fnCookieCallback"></a><a name="fnCookieCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnCookieCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Customise the cookie and / or the parameters being stored when using
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
780 DataTables with state saving enabled. This function is called whenever
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
781 the cookie is modified, and it expects a fully formed cookie string to be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
782 returned. Note that the data object passed in is a Javascript object which
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
783 must be converted to a string (JSON.stringify for example).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
784
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
785 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
786 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
787
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
788 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
789 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
790 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
791 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
792 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
793 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
794 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
795 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
796 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
797 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
798 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
799
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
800 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
801 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">sName</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Name of the cookie defined by DataTables</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oData</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Data to be stored in the cookie</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">sExpires</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Cookie expires string</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">sPath</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Path of the cookie to set</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
802 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
803 </table><h5>Returns:</h5><p class="returns"><p>Cookie formatted string (which should be encoded by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
804 using encodeURIComponent())</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
805 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
806 <pre class="brush: js"> $(document).ready( function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
807 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
808 "fnCookieCallback": function (sName, oData, sExpires, sPath) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
809 // Customise oData or sName or whatever else here
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
810 return sName + "="+JSON.stringify(oData)+"; expires=" + sExpires +"; path=" + sPath;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
811 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
812 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
813 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
814 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
815 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
816 <dt id="DataTable.defaults.fnCreatedRow" class=" odd"><a name="fnCreatedRow"></a><a name="fnCreatedRow_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnCreatedRow</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>This function is called when a TR element is created (and all TD child
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
817 elements have been inserted), or registered if using a DOM source, allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
818 manipulation of the TR element (adding classes etc).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
819
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
820 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
821 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
822
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
823 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
824 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
825 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
826 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
827 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
828 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
829 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
830 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
831 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
832 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
833 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
834
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
835 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
836 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nRow</td><td class="type type-param">node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>"TR" element for the current row</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">aData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Raw data array for this row</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">iDataIndex</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The index of this row in aoData</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
837 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
838 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
839 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
840 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
841 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
842 "fnCreatedRow": function( nRow, aData, iDataIndex ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
843 // Bold the grade for all 'A' grade browsers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
844 if ( aData[4] == "A" )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
845 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
846 $('td:eq(4)', nRow).html( '<b>A</b>' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
847 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
848 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
849 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
850 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
851 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
852 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
853 <dt id="DataTable.defaults.fnDrawCallback" class=" even"><a name="fnDrawCallback"></a><a name="fnDrawCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnDrawCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
854 dynamically modify any aspect you want about the created DOM.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
855
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
856 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
857 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
858
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
859 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
860 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
861 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
862 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
863 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
864 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
865 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
866 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
867 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
868 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
869 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
870
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
871 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
872 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
873 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
874 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
875 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
876 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
877 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
878 "fnDrawCallback": function( oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
879 alert( 'DataTables has redrawn the table' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
880 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
881 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
882 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
883 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
884 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
885 <dt id="DataTable.defaults.fnFooterCallback" class=" odd"><a name="fnFooterCallback"></a><a name="fnFooterCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnFooterCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Identical to fnHeaderCallback() but for the table footer this function
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
886 allows you to modify the table footer on every 'draw' even.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
887
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
888 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
889 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
890
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
891 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
892 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
893 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
894 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
895 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
896 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
897 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
898 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
899 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
900 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
901 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
902
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
903 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
904 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nFoot</td><td class="type type-param">node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>"TR" element for the footer</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">aData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Full table data (as derived from the original HTML)</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">iStart</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index for the current display starting point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
905 display array</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">iEnd</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index for the current display ending point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
906 display array</p></td></tr><tr class="even"><td class="number right_border"><div>5</div></td><td class="name">aiDisplay</td><td class="type type-param">array int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index array to translate the visual position
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
907 to the full data array</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
908 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
909 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
910 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
911 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
912 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
913 "fnFooterCallback": function( nFoot, aData, iStart, iEnd, aiDisplay ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
914 nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
915 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
916 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
917 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
918 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
919 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
920 <dt id="DataTable.defaults.fnFormatNumber" class=" even"><a name="fnFormatNumber"></a><a name="fnFormatNumber_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnFormatNumber</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>When rendering large numbers in the information element for the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
921 (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
922 to have a comma separator for the 'thousands' units (e.g. 1 million is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
923 rendered as "1,000,000") to help readability for the end user. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
924 function will override the default method DataTables uses.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
925
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
926 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
927 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
928
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
929 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
930 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
931 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
932 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
933 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
934 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
935 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
936 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
937 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
938 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
939 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
940
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
941 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
942 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">iIn</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>number to be formatted</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
943 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
944 </table><h5>Returns:</h5><p class="returns"><p>formatted string for DataTables to show the number</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
945 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
946 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
947 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
948 "fnFormatNumber": function ( iIn ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
949 if ( iIn &lt; 1000 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
950 return iIn;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
951 } else {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
952 var
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
953 s=(iIn+""),
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
954 a=s.split(""), out="",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
955 iLen=s.length;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
956
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
957 for ( var i=0 ; i&lt;iLen ; i++ ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
958 if ( i%3 === 0 &amp;&amp; i !== 0 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
959 out = "'"+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
960 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
961 out = a[iLen-i-1]+out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
962 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
963 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
964 return out;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
965 };
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
966 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
967 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
968 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
969 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
970 <dt id="DataTable.defaults.fnHeaderCallback" class=" odd"><a name="fnHeaderCallback"></a><a name="fnHeaderCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnHeaderCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>This function is called on every 'draw' event, and allows you to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
971 dynamically modify the header row. This can be used to calculate and
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
972 display useful information about the table.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
973
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
974 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
975 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
976
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
977 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
978 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
979 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
980 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
981 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
982 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
983 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
984 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
985 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
986 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
987 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
988
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
989 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
990 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nHead</td><td class="type type-param">node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>"TR" element for the header</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">aData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Full table data (as derived from the original HTML)</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">iStart</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index for the current display starting point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
991 display array</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">iEnd</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index for the current display ending point in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
992 display array</p></td></tr><tr class="even"><td class="number right_border"><div>5</div></td><td class="name">aiDisplay</td><td class="type type-param">array int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Index array to translate the visual position
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
993 to the full data array</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
994 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
995 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
996 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
997 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
998 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
999 "fnHeaderCallback": function( nHead, aData, iStart, iEnd, aiDisplay ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1000 nHead.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1001 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1002 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1003 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1004 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1005 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1006 <dt id="DataTable.defaults.fnInfoCallback" class=" even"><a name="fnInfoCallback"></a><a name="fnInfoCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnInfoCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>The information element can be used to convey information about the current
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1007 state of the table. Although the internationalisation options presented by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1008 DataTables are quite capable of dealing with most customisations, there may
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1009 be times where you wish to customise the string further. This callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1010 allows you to do exactly that.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1011
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1012 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1013 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1014
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1015 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1016 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1017 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1018 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1019 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1020 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1021 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1022 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1023 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1024 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1025 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1026
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1027 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1028 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">iStart</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Starting position in data for the draw</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">iEnd</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>End position in data for the draw</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">iMax</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Total number of rows in the table (regardless of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1029 filtering)</p></td></tr><tr class="even"><td class="number right_border"><div>5</div></td><td class="name">iTotal</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Total number of rows in the data set, after filtering</p></td></tr><tr class="odd"><td class="number right_border"><div>6</div></td><td class="name">sPre</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The string that DataTables has formatted using it's
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1030 own rules</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1031 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1032 </table><h5>Returns:</h5><p class="returns"><p>The string to be displayed in the information element.</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1033 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1034 <pre class="brush: js"> $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1035 "fnInfoCallback": function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1036 return iStart +" to "+ iEnd;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1037 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1038 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1039 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1040 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1041 <dt id="DataTable.defaults.fnInitComplete" class=" odd"><a name="fnInitComplete"></a><a name="fnInitComplete_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnInitComplete</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Called when the table has been initialised. Normally DataTables will
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1042 initialise sequentially and there will be no need for this function,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1043 however, this does not hold true when using external language information
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1044 since that is obtained using an async XHR call.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1045
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1046 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1047 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1048
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1049 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1050 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1051 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1052 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1053 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1054 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1055 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1056 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1057 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1058 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1059 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1060
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1061 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1062 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">json</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The JSON object request from the server - only
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1063 present if client-side Ajax sourced data is used</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1064 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1065 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1066 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1067 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1068 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1069 "fnInitComplete": function(oSettings, json) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1070 alert( 'DataTables has finished its initialisation.' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1071 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1072 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1073 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1074 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1075 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1076 <dt id="DataTable.defaults.fnPreDrawCallback" class=" even"><a name="fnPreDrawCallback"></a><a name="fnPreDrawCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnPreDrawCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Called at the very start of each table draw and can be used to cancel the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1077 draw by returning false, any other return (including undefined) results in
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1078 the full draw occurring).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1079
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1080 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1081 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1082
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1083 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1084 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1085 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1086 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1087 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1088 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1089 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1090 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1091 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1092 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1093 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1094
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1095 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1096 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1097 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1098 </table><h5>Returns:</h5><p class="returns"><p>False will cancel the draw, anything else (including no
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1099 return) will allow it to complete.</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1100 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1101 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1102 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1103 "fnPreDrawCallback": function( oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1104 if ( $('#test').val() == 1 ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1105 return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1106 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1107 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1108 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1109 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1110 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1111 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1112 <dt id="DataTable.defaults.fnRowCallback" class=" odd"><a name="fnRowCallback"></a><a name="fnRowCallback_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnRowCallback</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>This function allows you to 'post process' each row after it have been
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1113 generated for each table draw, but before it is rendered on screen. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1114 function might be used for setting the row class name etc.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1115
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1116 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1117 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1118
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1119 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1120 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1121 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1122 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1123 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1124 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1125 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1126 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1127 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1128 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1129 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1130
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1131 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1132 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">nRow</td><td class="type type-param">node</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>"TR" element for the current row</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">aData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Raw data array for this row</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">iDisplayIndex</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The display index for the current table draw</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">iDisplayIndexFull</td><td class="type type-param">int</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The index of the data in the full list of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1133 rows (after filtering)</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1134 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1135 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1136 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1137 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1138 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1139 "fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1140 // Bold the grade for all 'A' grade browsers
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1141 if ( aData[4] == "A" )
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1142 {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1143 $('td:eq(4)', nRow).html( '<b>A</b>' );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1144 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1145 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1146 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1147 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1148 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1149 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1150 <dt id="DataTable.defaults.fnServerData" class=" even"><a name="fnServerData"></a><a name="fnServerData_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnServerData</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>This parameter allows you to override the default function which obtains
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1151 the data from the server ($.getJSON) so something more suitable for your
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1152 application. For example you could use POST data, or pull information from
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1153 a Gears or AIR database.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1154
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1155 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1156 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1157
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1158 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1159 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1160 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1161 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1162 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1163 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1164 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1165 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1166 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1167 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1168 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1169
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1170 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1171 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">sSource</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>HTTP source to obtain the data from (sAjaxSource)</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">aoData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>A key/value pair object containing the data to send
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1172 to the server</p></td></tr><tr class="even"><td class="number right_border"><div>3</div></td><td class="name">fnCallback</td><td class="type type-param">function</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>to be called on completion of the data get
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1173 process that will draw the data on the page.</p></td></tr><tr class="odd"><td class="number right_border"><div>4</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1174 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1175 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1176 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1177 <pre class="brush: js"> // POST data to server
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1178 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1179 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1180 "bProcessing": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1181 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1182 "sAjaxSource": "xhr.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1183 "fnServerData": function ( sSource, aoData, fnCallback, oSettings ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1184 oSettings.jqXHR = $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1185 "dataType": 'json',
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1186 "type": "POST",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1187 "url": sSource,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1188 "data": aoData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1189 "success": fnCallback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1190 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1191 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1192 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1193 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1194 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1195 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1196 <dt id="DataTable.defaults.fnServerParams" class=" odd"><a name="fnServerParams"></a><a name="fnServerParams_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnServerParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>It is often useful to send extra data to the server when making an Ajax
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1197 request - for example custom filtering information, and this callback
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1198 function makes it trivial to send extra information to the server. The
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1199 passed in parameter is the data set that has been constructed by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1200 DataTables, and you can add to this or modify it as you require.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1201
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1202 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1203 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1204
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1205 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1206 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1207 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1208 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1209 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1210 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1211 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1212 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1213 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1214 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1215 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1216
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1217 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1218 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">aoData</td><td class="type type-param">array</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Data array (array of objects which are name/value
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1219 pairs) that has been constructed by DataTables and will be sent to the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1220 server. In the case of Ajax sourced data with server-side processing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1221 this will be an empty array, for server-side processing there will be a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1222 significant number of parameters!</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1223 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1224 </table><h5>Returns:</h5><p class="returns"><p>Ensure that you modify the aoData array passed in,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1225 as this is passed by reference.</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1226 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1227 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1228 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1229 "bProcessing": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1230 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1231 "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1232 "fnServerParams": function ( aoData ) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1233 aoData.push( { "name": "more_data", "value": "my_value" } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1234 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1235 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1236 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1237 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1238 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1239 <dt id="DataTable.defaults.fnStateLoad" class=" even"><a name="fnStateLoad"></a><a name="fnStateLoad_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnStateLoad</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Load the table state. With this function you can define from where, and how, the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1240 state of a table is loaded. By default DataTables will load from its state saving
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1241 cookie, but you might wish to use local storage (HTML5) or a server-side database.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1242
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1243 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1244 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1245
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1246 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1247 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1248 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1249 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1250 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1251 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1252 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1253 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1254 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1255 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1256 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1257
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1258 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1259 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1260 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1261 </table><h5>Returns:</h5><p class="returns"><p>The DataTables state object to be loaded</p></p><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1262 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1263 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1264 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1265 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1266 "fnStateLoad": function (oSettings) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1267 var o;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1268
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1269 // Send an Ajax request to the server to get the data. Note that
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1270 // this is a synchronous request.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1271 $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1272 "url": "/state_load",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1273 "async": false,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1274 "dataType": "json",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1275 "success": function (json) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1276 o = json;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1277 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1278 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1279
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1280 return o;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1281 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1282 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1283 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1284 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1285 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1286 <dt id="DataTable.defaults.fnStateLoaded" class=" odd"><a name="fnStateLoaded"></a><a name="fnStateLoaded_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnStateLoaded</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Callback that is called when the state has been loaded from the state saving method
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1287 and the DataTables settings object has been modified as a result of the loaded state.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1288
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1289 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1290 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1291
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1292 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1293 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1294 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1295 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1296 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1297 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1298 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1299 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1300 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1301 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1302 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1303
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1304 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1305 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oData</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The state object that was loaded</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1306 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1307 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1308 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1309 <pre class="brush: js"> // Show an alert with the filtering value that was saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1310 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1311 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1312 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1313 "fnStateLoaded": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1314 alert( 'Saved filter was: '+oData.oSearch.sSearch );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1315 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1316 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1317 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1318 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1319 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1320 <dt id="DataTable.defaults.fnStateLoadParams" class=" even"><a name="fnStateLoadParams"></a><a name="fnStateLoadParams_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnStateLoadParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Callback which allows modification of the saved state prior to loading that state.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1321 This callback is called when the table is loading state from the stored data, but
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1322 prior to the settings object being modified by the saved state. Note that for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1323 plug-in authors, you should use the 'stateLoadParams' event to load parameters for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1324 a plug-in.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1325
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1326 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1327 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1328
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1329 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1330 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1331 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1332 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1333 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1334 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1335 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1336 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1337 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1338 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1339 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1340
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1341 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1342 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oData</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The state object that is to be loaded</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1343 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1344 </table><h5>Examples:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1345 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1346 <pre class="brush: js"> // Remove a saved filter, so filtering is never loaded
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1347 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1348 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1349 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1350 "fnStateLoadParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1351 oData.oSearch.sSearch = "";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1352 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1353 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1354 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1355
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1356 </pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1357 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1358
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1359 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1360 <pre class="brush: js"> // Disallow state loading by returning false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1361 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1362 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1363 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1364 "fnStateLoadParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1365 return false;
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1366 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1367 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1368 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1369 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1370 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1371 <dt id="DataTable.defaults.fnStateSave" class=" odd"><a name="fnStateSave"></a><a name="fnStateSave_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnStateSave</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" odd"><p>Save the table state. This function allows you to define where and how the state
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1372 information for the table is stored - by default it will use a cookie, but you
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1373 might want to use local storage (HTML5) or a server-side database.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1374
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1375 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1376 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1377
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1378 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1379 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1380 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1381 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1382 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1383 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1384 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1385 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1386 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1387 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1388 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1389
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1390 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1391 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oData</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The state object to be saved</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1392 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1393 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1394 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1395 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1396 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1397 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1398 "fnStateSave": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1399 // Send an Ajax request to the server with the state object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1400 $.ajax( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1401 "url": "/state_save",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1402 "data": oData,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1403 "dataType": "json",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1404 "method": "POST"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1405 "success": function () {}
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1406 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1407 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1408 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1409 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1410 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1411 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1412 <dt id="DataTable.defaults.fnStateSaveParams" class=" even"><a name="fnStateSaveParams"></a><a name="fnStateSaveParams_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnStateSaveParams</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class=" even"><p>Callback which allows modification of the state to be saved. Called when the table
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1413 has changed state a new state save is required. This method allows modification of
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1414 the state saving object prior to actually doing the save, including addition or
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1415 other state properties or modification. Note that for plug-in authors, you should
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1416 use the 'stateSaveParams' event to save parameters for a plug-in.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1417
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1418 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1419 <h5>Parameters:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1420
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1421 <table class="params">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1422 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1423 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1424 <th width="20"></th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1425 <th width="12%" class="bottom_border name">Name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1426 <th width="10%" class="bottom_border">Type</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1427 <th width="10%" class="bottom_border">Attributes</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1428 <th width="10%" class="bottom_border">Default</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1429 <th class="last bottom_border">Description</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1430 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1431 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1432
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1433 <tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1434 <tr class="even"><td class="number right_border"><div>1</div></td><td class="name">oSettings</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>DataTables settings object</p></td></tr><tr class="odd"><td class="number right_border"><div>2</div></td><td class="name">oData</td><td class="type type-param">object</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>The state object to be saved</p></td></tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1435 </tbody>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1436 </table><h5>Example:</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1437 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1438 <pre class="brush: js"> // Remove a saved filter, so filtering is never saved
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1439 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1440 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1441 "bStateSave": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1442 "fnStateSaveParams": function (oSettings, oData) {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1443 oData.oSearch.sSearch = "";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1444 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1445 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1446 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1447 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1448 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1449 <dt class=" odd"><a name="iCookieDuration"></a><a name="iCookieDuration_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iCookieDuration">iCookieDuration</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>Duration of the cookie which is used for storing session information. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1450 value is given in seconds.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1451
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1452 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1453 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1454 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1455 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1456 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1457 "iCookieDuration": 60*60*24; // 1 day
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1458 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1459 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1460 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1461 </div></dd><dt class=" even"><a name="iDeferLoading"></a><a name="iDeferLoading_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDeferLoading">iDeferLoading</a></span><span class="type-sig"><span class="type-signature"> :int|array</span></span></dt><dd class=" even"><p>When enabled DataTables will not make a request to the server for the first
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1462 page draw - rather it will use the data already on the page (no sorting etc
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1463 will be applied to it), thus saving on an XHR at load time. iDeferLoading
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1464 is used to indicate that deferred loading is required, but it is also used
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1465 to tell DataTables how many records there are in the full table (allowing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1466 the information element and pagination to be displayed correctly). In the case
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1467 where a filtering is applied to the table on initial load, this can be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1468 indicated by giving the parameter as an array, where the first element is
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1469 the number of records available after filtering and the second element is the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1470 number of records without filtering (allowing the table information element
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1471 to be shown correctly).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1472
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1473 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1474 <h5>Examples</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1475 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1476 <pre class="brush: js"> // 57 records available in the table, no filtering applied
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1477 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1478 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1479 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1480 "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1481 "iDeferLoading": 57
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1482 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1483 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1484
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1485 </pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1486 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1487
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1488 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1489 <pre class="brush: js"> // 57 records after filtering, 100 without filtering (an initial filter applied)
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1490 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1491 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1492 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1493 "sAjaxSource": "scripts/server_processing.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1494 "iDeferLoading": [ 57, 100 ],
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1495 "oSearch": {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1496 "sSearch": "my_filter"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1497 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1498 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1499 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1500 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1501 </div></dd><dt class=" odd"><a name="iDisplayLength"></a><a name="iDisplayLength_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDisplayLength">iDisplayLength</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>Number of rows to display on a single page when using pagination. If
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1502 feature enabled (bLengthChange) then the end user will be able to override
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1503 this to a custom setting using a pop-up menu.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1504
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1505 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1506 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1507 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1508 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1509 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1510 "iDisplayLength": 50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1511 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1512 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1513 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1514 </div></dd><dt class=" even"><a name="iDisplayStart"></a><a name="iDisplayStart_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iDisplayStart">iDisplayStart</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>Define the starting point for data display when using DataTables with
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1515 pagination. Note that this parameter is the number of records, rather than
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1516 the page number, so if you have 10 records per page and want to start on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1517 the third page, it should be "20".</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1518
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1519 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1520 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1521 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1522 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1523 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1524 "iDisplayStart": 20
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1525 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1526 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1527 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1528 </div></dd><dt class=" odd"><a name="iScrollLoadGap"></a><a name="iScrollLoadGap_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iScrollLoadGap">iScrollLoadGap</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" odd"><p>The scroll gap is the amount of scrolling that is left to go before
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1529 DataTables will load the next 'page' of data automatically. You typically
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1530 want a gap which is big enough that the scrolling will be smooth for the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1531 user, while not so large that it will load more data than need.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1532
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1533 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1534 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1535 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1536 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1537 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1538 "bScrollInfinite": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1539 "bScrollCollapse": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1540 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1541 "iScrollLoadGap": 50
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1542 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1543 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1544 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1545 </div></dd><dt class=" even"><a name="iTabIndex"></a><a name="iTabIndex_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iTabIndex">iTabIndex</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class=" even"><p>By default DataTables allows keyboard navigation of the table (sorting, paging,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1546 and filtering) by adding a tabindex attribute to the required elements. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1547 allows you to tab through the controls and press the enter key to activate them.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1548 The tabindex is default 0, meaning that the tab follows the flow of the document.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1549 You can overrule this using this parameter if you wish. Use a value of -1 to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1550 disable built-in keyboard navigation.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1551
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1552 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1553 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1554 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1555 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1556 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1557 "iTabIndex": 1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1558 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1559 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1560 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1561 </div></dd><dt class=" odd"><a name="sAjaxDataProp"></a><a name="sAjaxDataProp_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sAjaxDataProp">sAjaxDataProp</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>By default DataTables will look for the property 'aaData' when obtaining
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1562 data from an Ajax source or for server-side processing - this parameter
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1563 allows that property to be changed. You can use Javascript dotted object
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1564 notation to get a data source for multiple levels of nesting.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1565
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1566 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1567 <h5>Examples</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1568 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1569 <pre class="brush: js"> // Get data from { "data": [...] }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1570 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1571 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1572 "sAjaxSource": "sources/data.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1573 "sAjaxDataProp": "data"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1574 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1575 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1576
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1577 </pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1578 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1579
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1580 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1581 <pre class="brush: js"> // Get data from { "data": { "inner": [...] } }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1582 $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1583 var oTable = $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1584 "sAjaxSource": "sources/data.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1585 "sAjaxDataProp": "data.inner"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1586 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1587 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1588 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1589 </div></dd><dt class=" even"><a name="sAjaxSource"></a><a name="sAjaxSource_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sAjaxSource">sAjaxSource</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>You can instruct DataTables to load data from an external source using this
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1590 parameter (use aData if you want to pass data in you already have). Simply
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1591 provide a url a JSON object can be obtained from. This object must include
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1592 the parameter 'aaData' which is the data source for the table.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1593
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1594 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1595 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1596 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1597 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1598 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1599 "sAjaxSource": "http://www.sprymedia.co.uk/dataTables/json.php"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1600 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1601 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1602 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1603 </div></dd><dt class=" odd"><a name="sCookiePrefix"></a><a name="sCookiePrefix_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sCookiePrefix">sCookiePrefix</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>This parameter can be used to override the default prefix that DataTables
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1604 assigns to a cookie when state saving is enabled.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1605
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1606 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1607 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1608 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1609 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1610 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1611 "sCookiePrefix": "my_datatable_",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1612 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1613 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1614 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1615 </div></dd><dt class=" even"><a name="sDom"></a><a name="sDom_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sDom">sDom</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>This initialisation variable allows you to specify exactly where in the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1616 DOM you want DataTables to inject the various controls it adds to the page
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1617 (for example you might want the pagination controls at the top of the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1618 table). DIV elements (with or without a custom class) can also be added to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1619 aid styling. The follow syntax is used:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1620 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1621 <li>The following options are allowed: <br />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1622 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1623 <li>'l' - Length changing</li
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1624 <li>'f' - Filtering input</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1625 <li>'t' - The table!</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1626 <li>'i' - Information</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1627 <li>'p' - Pagination</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1628 <li>'r' - pRocessing</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1629 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1630 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1631 <li>The following constants are allowed:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1632 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1633 <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1634 <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1635 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1636 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1637 <li>The following syntax is expected:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1638 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1639 <li>'&lt;' and '&gt;' - div elements</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1640 <li>'&lt;"class" and '&gt;' - div with a class</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1641 <li>'&lt;"#id" and '&gt;' - div with an ID</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1642 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1643 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1644 <li>Examples:
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1645 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1646 <li>'&lt;"wrapper"flipt&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1647 <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1648 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1649 </li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1650 </ul></p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1651
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1652 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1653 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1654 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1655 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1656 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1657 "sDom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1658 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1659 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1660 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1661 </div></dd><dt class=" odd"><a name="sPaginationType"></a><a name="sPaginationType_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sPaginationType">sPaginationType</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>DataTables features two different built-in pagination interaction methods
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1662 ('two_button' or 'full_numbers') which present different page controls to
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1663 the end user. Further methods can be added using the API (see below).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1664
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1665 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1666 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1667 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1668 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1669 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1670 "sPaginationType": "full_numbers"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1671 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1672 } )</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1673 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1674 </div></dd><dt class=" even"><a name="sScrollX"></a><a name="sScrollX_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollX">sScrollX</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Enable horizontal scrolling. When a table is too wide to fit into a certain
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1675 layout, or you have a large number of columns in the table, you can enable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1676 x-scrolling to show the table in a viewport, which can be scrolled. This
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1677 property can be any CSS unit, or a number (in which case it will be treated
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1678 as a pixel measurement).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1679
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1680 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1681 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1682 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1683 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1684 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1685 "sScrollX": "100%",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1686 "bScrollCollapse": true
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1687 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1688 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1689 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1690 </div></dd><dt class=" odd"><a name="sScrollXInner"></a><a name="sScrollXInner_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollXInner">sScrollXInner</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>This property can be used to force a DataTable to use more width than it
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1691 might otherwise do when x-scrolling is enabled. For example if you have a
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1692 table which requires to be well spaced, this parameter is useful for
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1693 "over-sizing" the table, and thus forcing scrolling. This property can by
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1694 any CSS unit, or a number (in which case it will be treated as a pixel
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1695 measurement).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1696
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1697 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1698 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1699 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1700 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1701 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1702 "sScrollX": "100%",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1703 "sScrollXInner": "110%"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1704 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1705 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1706 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1707 </div></dd><dt class=" even"><a name="sScrollY"></a><a name="sScrollY_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sScrollY">sScrollY</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" even"><p>Enable vertical scrolling. Vertical scrolling will constrain the DataTable
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1708 to the given height, and enable scrolling for any data which overflows the
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1709 current viewport. This can be used as an alternative to paging to display
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1710 a lot of data in a small area (although paging and scrolling can both be
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1711 enabled at the same time). This property can be any CSS unit, or a number
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1712 (in which case it will be treated as a pixel measurement).</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1713
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1714 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1715 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1716 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1717 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1718 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1719 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1720 "bPaginate": false
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1721 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1722 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1723 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1724 </div></dd><dt class=" odd"><a name="sServerMethod"></a><a name="sServerMethod_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sServerMethod">sServerMethod</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class=" odd"><p>Set the HTTP method that is used to make the Ajax call for server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1725 processing or Ajax sourced data.</p><div class="collapse_details"><dl class="details">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1726
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1727 </dl>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1728 <h5>Example</h5>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1729 <div class="example-code">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1730 <pre class="brush: js"> $(document).ready( function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1731 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1732 "bServerSide": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1733 "sAjaxSource": "scripts/post.php",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1734 "sServerMethod": "POST"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1735 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1736 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1737 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1738 </div></dd>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1739 </dl></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1740 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1741
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1742 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1743
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1744 <div class="fw_footer">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1745 DataTables: Copyright 2008-2012 Allan Jardine, all rights reserved<br>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1746
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1747 Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1748 23th Sep 2012 - 14:27
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1749 with the <a href="http://datatables.net/">DataTables</a> template.
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1750 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1751 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1752 </html>