annotate DataTables-1.9.4/extras/Scroller/api_scrolling.html @ 0:ac5f9272033b draft

first upload
author saskia-hiltemann
date Tue, 01 Jul 2014 11:42:23 -0400
parents
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 <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico" />
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 <title>DataTables example</title>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8 <style type="text/css">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 @import "../../media/css/demo_page.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 @import "../../media/css/demo_table.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 @import "media/css/dataTables.scroller.css";
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 </style>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 <script type="text/javascript" language="javascript" src="../../media/js/jquery.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 <script type="text/javascript" language="javascript" src="../../media/js/jquery.dataTables.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 <script type="text/javascript" language="javascript" src="media/js/dataTables.scroller.js"></script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16 <script type="text/javascript" charset="utf-8">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 $(document).ready(function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 "sAjaxSource": "media/data/2500.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 "sDom": "frtiS",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 "bDeferRender": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 "fnInitComplete": function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 this.fnSettings().oScroller.fnScrollToRow( 1000 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 </script>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 </head>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30 <body id="dt_example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 <div id="container" style="width:980px">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 <div class="full_width big">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 Scroller API example
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 <h1>Preamble</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 <p>This example shows a trivial use of the Scroller API to scroll the table to row 1000 once the table has been loaded. Any number could be used here, and a small animated effect is used to provide visual feedback to the user (this can be disabled by passed false as a second parameter to fnScrollToRow).</p>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 <h1>Live example</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 <div id="demo">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 <thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 <tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 <th>ID</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 <th>First name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 <th>Last name</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 <th>ZIP</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 <th width="33%">Country</th>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 </tr>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 </thead>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 </table>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 <div class="spacer"></div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 <h1>Initialisation code</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 <pre>$(document).ready(function() {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 $('#example').dataTable( {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 "sScrollY": "200px",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 "sAjaxSource": "media/data/2500.txt",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 "sDom": "frtiS",
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 "bDeferRender": true,
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 "fnInitComplete": function () {
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 this.fnSettings().oScroller.fnScrollToRow( 1000 );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 }
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 } );
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 } );</pre>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 <h1>Other examples</h1>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 <div class="demo_links">
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 <ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 <li><a href="index.html">Basic initialisation of Scroller</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 <li><a href="state_saving.html">State saving</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 <li><a href="api_scrolling.html">API - pragmatically move to a row</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 <li><a href="server-side_processing.html">Server-side processing with Scroller</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 <li><a href="large_js_source.html">50'000 rows in a table - client-side generated data</a></li>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 </ul>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 </div>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 </body>
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 </html>