Subversion-Projekte lars-tiefland.cienc

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
9 lars 1
<!DOCTYPE html>
2
<html>
3
<head>
4
	<meta charset="utf-8">
5
	<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
6
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
7
 
8
	<title>DataTables example - Defer rendering</title>
9
	<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../../css/select.dataTables.css">
11
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
12
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
13
	<style type="text/css" class="init">
14
 
15
	</style>
16
	<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
17
	<script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
18
	<script type="text/javascript" language="javascript" src="../../js/dataTables.select.js"></script>
19
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
20
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
21
	<script type="text/javascript" language="javascript" class="init">
22
 
23
$(document).ready(function() {
24
	var table = $('#example').DataTable( {
25
		ajax: '../../../../examples/ajax/data/objects.txt',
26
		deferRender: true,
27
		columns: [
28
			{ data: 'name' },
29
			{ data: 'position' },
30
			{ data: 'office' },
31
			{ data: 'extn' },
32
			{ data: 'start_date' },
33
			{ data: 'salary' }
34
		],
35
		select: true
36
	} );
37
} );
38
 
39
	</script>
40
</head>
41
 
42
<body class="dt-example">
43
	<div class="container">
44
		<section>
45
			<h1>DataTables example <span>Defer rendering</span></h1>
46
 
47
			<div class="info">
48
				<p>This example simply shows Select being used with DataTables' <a href="//datatables.net/reference/option/deferRender"><code class="option" title=
49
				"DataTables initialisation option">deferRender</code></a> option. Deferred rendering can be particularly useful when Ajax loading data as it allows DataTables to
50
				perform a number of performance enhancing optimisations.</p>
51
			</div>
52
 
53
			<table id="example" class="display" cellspacing="0" width="100%">
54
				<thead>
55
					<tr>
56
						<th>Name</th>
57
						<th>Position</th>
58
						<th>Office</th>
59
						<th>Extn.</th>
60
						<th>Start date</th>
61
						<th>Salary</th>
62
					</tr>
63
				</thead>
64
 
65
				<tfoot>
66
					<tr>
67
						<th>Name</th>
68
						<th>Position</th>
69
						<th>Office</th>
70
						<th>Extn.</th>
71
						<th>Start date</th>
72
						<th>Salary</th>
73
					</tr>
74
				</tfoot>
75
			</table>
76
 
77
			<ul class="tabs">
78
				<li class="active">Javascript</li>
79
				<li>HTML</li>
80
				<li>CSS</li>
81
				<li>Ajax</li>
82
				<li>Server-side script</li>
83
			</ul>
84
 
85
			<div class="tabs">
86
				<div class="js">
87
					<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
88
	var table = $('#example').DataTable( {
89
		ajax: '../../../../examples/ajax/data/objects.txt',
90
		deferRender: true,
91
		columns: [
92
			{ data: 'name' },
93
			{ data: 'position' },
94
			{ data: 'office' },
95
			{ data: 'extn' },
96
			{ data: 'start_date' },
97
			{ data: 'salary' }
98
		],
99
		select: true
100
	} );
101
} );</code>
102
 
103
					<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
104
 
105
					<ul>
106
						<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
107
						<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
108
						<li><a href="../../js/dataTables.select.js">../../js/dataTables.select.js</a></li>
109
					</ul>
110
				</div>
111
 
112
				<div class="table">
113
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
114
				</div>
115
 
116
				<div class="css">
117
					<div>
118
						<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
119
						additional CSS used is shown below:</p><code class="multiline language-css"></code>
120
					</div>
121
 
122
					<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
123
 
124
					<ul>
125
						<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
126
						<li><a href="../../css/select.dataTables.css">../../css/select.dataTables.css</a></li>
127
					</ul>
128
				</div>
129
 
130
				<div class="ajax">
131
					<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
132
					loaded.</p>
133
				</div>
134
 
135
				<div class="php">
136
					<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
137
					processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
138
					documentation</a>.</p>
139
				</div>
140
			</div>
141
		</section>
142
	</div>
143
 
144
	<section>
145
		<div class="footer">
146
			<div class="gradient"></div>
147
 
148
			<div class="liner">
149
				<h2>Other examples</h2>
150
 
151
				<div class="toc">
152
					<div class="toc-group">
153
						<h3><a href="./index.html">Initialisation</a></h3>
154
						<ul class="toc active">
155
							<li><a href="./simple.html">Simple initialisation</a></li>
156
							<li><a href="./single.html">Single item selection</a></li>
157
							<li><a href="./multi.html">Multi item selection</a></li>
158
							<li><a href="./cells.html">Cell selection</a></li>
159
							<li><a href="./checkbox.html">Checkbox selection</a></li>
160
							<li><a href="./i18n.html">Internationalisation</a></li>
161
							<li><a href="./blurable.html">Blur selection</a></li>
162
							<li class="active"><a href="./deferRender.html">Defer rendering</a></li>
163
							<li><a href="./buttons.html">Buttons</a></li>
164
							<li><a href="./reload.html">Retain selection on reload</a></li>
165
						</ul>
166
					</div>
167
 
168
					<div class="toc-group">
169
						<h3><a href="../styling/index.html">Styling</a></h3>
170
						<ul class="toc">
171
							<li><a href="../styling/bootstrap.html">Bootstrap styling</a></li>
172
							<li><a href="../styling/foundation.html">Foundation styling</a></li>
173
							<li><a href="../styling/jqueryui.html">jQuery UI styling</a></li>
174
						</ul>
175
					</div>
176
 
177
					<div class="toc-group">
178
						<h3><a href="../api/index.html">API</a></h3>
179
						<ul class="toc">
180
							<li><a href="../api/events.html">Events</a></li>
181
							<li><a href="../api/get.html">Get selected items</a></li>
182
							<li><a href="../api/select.html">Select items</a></li>
183
						</ul>
184
					</div>
185
				</div>
186
 
187
				<div class="epilogue">
188
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
189
					Additionally, there are a wide range of <a href="http://www.datatables.net/extensions">extensions</a> and <a href=
190
					"http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p>
191
 
192
					<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
193
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
194
				</div>
195
			</div>
196
		</div>
197
	</section>
198
</body>
199
</html>