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>Scroller example - FixedColumns integration</title>
9
	<link rel="stylesheet" type="text/css" href="../../../../media/css/jquery.dataTables.css">
10
	<link rel="stylesheet" type="text/css" href="../../../FixedColumns/css/fixedColumns.datatables.css">
11
	<link rel="stylesheet" type="text/css" href="../../css/scroller.datatables.css">
12
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/syntax/shCore.css">
13
	<link rel="stylesheet" type="text/css" href="../../../../examples/resources/demo.css">
14
	<style type="text/css" class="init">
15
 
16
	/* For this example, force x-scrolling by making the table width smaller */
17
	div.dataTables_wrapper {
18
		width: 75%;
19
		margin: 0 auto;
20
	}
21
 
22
	</style>
23
	<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
24
	<script type="text/javascript" language="javascript" src="../../../../media/js/jquery.dataTables.js"></script>
25
	<script type="text/javascript" language="javascript" src="../../../FixedColumns/js/dataTables.fixedColumns.js"></script>
26
	<script type="text/javascript" language="javascript" src="../../js/dataTables.scroller.js"></script>
27
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/syntax/shCore.js"></script>
28
	<script type="text/javascript" language="javascript" src="../../../../examples/resources/demo.js"></script>
29
	<script type="text/javascript" language="javascript" class="init">
30
 
31
 
32
$(document).ready(function() {
33
	var table = $('#example').DataTable( {
34
		ajax:           "../data/2500.txt",
35
		deferRender:    true,
36
		scrollY:        200,
37
		scrollX:        true,
38
		scrollCollapse: true,
39
		scroller:       true
40
	} );
41
 
42
	new $.fn.dataTable.FixedColumns( table );
43
} );
44
 
45
 
46
	</script>
47
</head>
48
 
49
<body class="dt-example">
50
	<div class="container">
51
		<section>
52
			<h1>Scroller example <span>FixedColumns integration</span></h1>
53
 
54
			<div class="info">
55
				<p>This example shows Scroller operating with <a href="//datatables.net/extensions/fixedcolumns">FixedColumns</a>. FixedColumns has the ability to "freeze" columns
56
				and the left and right of a scrolling table in place. Initialisation is exactly the same as normal and all of the standard options are available for both
57
				FixedColumns and Scroller. They will automatically detect if they are being used together.</p>
58
 
59
				<p>You may need to resize your browser window to force the table to scroll horizontally with this example!</p>
60
			</div>
61
 
62
			<table id="example" class="stripe row-border order-column nowrap" cellspacing="0" width="100%">
63
				<thead>
64
					<tr>
65
						<th>ID</th>
66
						<th>First name</th>
67
						<th>Last name</th>
68
						<th>ZIP / Post code</th>
69
						<th>Country</th>
70
					</tr>
71
				</thead>
72
			</table>
73
 
74
			<ul class="tabs">
75
				<li class="active">Javascript</li>
76
				<li>HTML</li>
77
				<li>CSS</li>
78
				<li>Ajax</li>
79
				<li>Server-side script</li>
80
			</ul>
81
 
82
			<div class="tabs">
83
				<div class="js">
84
					<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
85
	var table = $('#example').DataTable( {
86
		ajax:           &quot;../data/2500.txt&quot;,
87
		deferRender:    true,
88
		scrollY:        200,
89
		scrollX:        true,
90
		scrollCollapse: true,
91
		scroller:       true
92
	} );
93
 
94
	new $.fn.dataTable.FixedColumns( table );
95
} );</code>
96
 
97
					<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
98
 
99
					<ul>
100
						<li><a href="//code.jquery.com/jquery-1.11.3.min.js">//code.jquery.com/jquery-1.11.3.min.js</a></li>
101
						<li><a href="../../../../media/js/jquery.dataTables.js">../../../../media/js/jquery.dataTables.js</a></li>
102
						<li><a href="../../../FixedColumns/js/dataTables.fixedColumns.js">../../../FixedColumns/js/dataTables.fixedColumns.js</a></li>
103
						<li><a href="../../js/dataTables.scroller.js">../../js/dataTables.scroller.js</a></li>
104
					</ul>
105
				</div>
106
 
107
				<div class="table">
108
					<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
109
				</div>
110
 
111
				<div class="css">
112
					<div>
113
						<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
114
						additional CSS used is shown below:</p><code class="multiline language-css">/* For this example, force x-scrolling by making the table width smaller */
115
	div.dataTables_wrapper {
116
		width: 75%;
117
		margin: 0 auto;
118
	}</code>
119
					</div>
120
 
121
					<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
122
 
123
					<ul>
124
						<li><a href="../../../../media/css/jquery.dataTables.css">../../../../media/css/jquery.dataTables.css</a></li>
125
						<li><a href="../../../FixedColumns/css/fixedColumns.datatables.css">../../../FixedColumns/css/fixedColumns.datatables.css</a></li>
126
						<li><a href="../../css/scroller.datatables.css">../../css/scroller.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">Basic initialisation</a></li>
156
							<li><a href="./state_saving.html">State saving</a></li>
157
							<li><a href="./large_js_source.html">Client-side data source (50,000 rows)</a></li>
158
							<li><a href="./server-side_processing.html">Server-side processing (5,000,000 rows)</a></li>
159
							<li><a href="./api_scrolling.html">API</a></li>
160
							<li class="active"><a href="./fixedColumns.html">FixedColumns integration</a></li>
161
						</ul>
162
					</div>
163
 
164
					<div class="toc-group">
165
						<h3><a href="../styling/index.html">Styling</a></h3>
166
						<ul class="toc">
167
							<li><a href="../styling/bootstrap.html">Bootstrap</a></li>
168
							<li><a href="../styling/foundation.html">Foundation</a></li>
169
							<li><a href="../styling/jqueryui.html">jQuery UI</a></li>
170
						</ul>
171
					</div>
172
				</div>
173
 
174
				<div class="epilogue">
175
					<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
176
					Additionally, there are a wide range of <a href="http://www.datatables.net/extensions">extensions</a> and <a href=
177
					"http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p>
178
 
179
					<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br>
180
					DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
181
				</div>
182
			</div>
183
		</div>
184
	</section>
185
</body>
186
</html>