forked from th3uiguy/jquery-scrolltable
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
255 lines (250 loc) · 6.31 KB
/
demo.html
File metadata and controls
255 lines (250 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery Scroll Table</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.22/themes/base/jquery-ui.css" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.22/jquery-ui.min.js"></script>
<script type="text/javascript" src="jquery.scrolltable.js"></script>
<script type="text/javascript">
$(function(){
$('#removeScroll').click(function(){
$('.scrollTable').scrolltable('destroy');
})
$('#applyScroll').click(function(){
$('.scrollTable').scrolltable({
stripe: true,
oddClass: 'odd'
});
});
$('#applyScroll').trigger('click');
});
</script>
<style type="text/css">
body{ font-size: 0.9em; font-family: Arial, Verdana, sans-serif; color:#555; }
h1{ margin-top: 0; float: left; }
#controls{ float: left; padding: 0.3em 1em; }
table.scrollTable{
width:100%;
border:1px solid #ddd;
}
thead{
background-color: #eee;
}
thead th{
text-align: center;
padding:0.1em 0.3em;
}
tbody td{
border-top:1px solid #eee;
border-right:1px solid #eee;
padding:0.1em 0.3em;
}
tbody tr.odd td{
background-color: #f9f9f9;
}
</style>
</head>
<body>
<h1>jQuery Scroll Table Demo</h1>
<div id="controls">
<button id="removeScroll">Remove Scroll</button>
<button id="applyScroll">Apply Scroll</button>
</div>
<div style="clear:both" />
<table class="scrollTable" cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<!-- Notice it is smart about how to use the widths below, trying to maintain the intended layout -->
<th width="10%" style="width:10%">Col 1</th>
<th>Col 2</th>
<th style="width:80px">Col 3</th>
<th width="40%">Col 4</th>
</tr>
</thead>
<tbody>
<tr>
<td>Row 1</td>
<td>Row 1 cell with some content</td>
<td>Row 1</td>
<td>Row 1 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 2</td>
<td>Row 2 cell with some content</td>
<td>Row 2</td>
<td>Row 2 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 3</td>
<td>Row 3 cell with some content</td>
<td>Row 3</td>
<td>Row 3 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 4</td>
<td>Row 4 cell with some content</td>
<td>Row 4</td>
<td>Row 4 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 5</td>
<td>Row 5 cell with some content</td>
<td>Row 5</td>
<td>Row 5 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 6</td>
<td>Row 6 cell with some content</td>
<td>Row 6</td>
<td>Row 6 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 7</td>
<td>Row 7 cell with some content</td>
<td>Row 7</td>
<td>Row 7 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 8</td>
<td>Row 8 cell with some content</td>
<td>Row 8</td>
<td>Row 8 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 9</td>
<td>Row 9 cell with some content</td>
<td>Row 9</td>
<td>Row 9 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 10</td>
<td>Row 10 cell with some content</td>
<td>Row 10</td>
<td>Row 10 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 11</td>
<td>Row 11 cell with some content</td>
<td>Row 11</td>
<td>Row 11 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 12</td>
<td>Row 12 cell with some content</td>
<td>Row 12</td>
<td>Row 12 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 13</td>
<td>Row 13 cell with some content</td>
<td>Row 13</td>
<td>Row 13 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 14</td>
<td>Row 14 cell with some content</td>
<td>Row 14</td>
<td>Row 14 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 15</td>
<td>Row 15 cell with some content</td>
<td>Row 15</td>
<td>Row 15 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 16</td>
<td>Row 16 cell with some content</td>
<td>Row 16</td>
<td>Row 16 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 17</td>
<td>Row 17 cell with some content</td>
<td>Row 17</td>
<td>Row 17 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 18</td>
<td>Row 18 cell with some content</td>
<td>Row 18</td>
<td>Row 18 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 19</td>
<td>Row 19 cell with some content</td>
<td>Row 19</td>
<td>Row 19 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 20</td>
<td>Row 20 cell with some content</td>
<td>Row 20</td>
<td>Row 20 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 21</td>
<td>Row 21 cell with some content</td>
<td>Row 21</td>
<td>Row 21 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 22</td>
<td>Row 22 cell with some content</td>
<td>Row 22</td>
<td>Row 22 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 23</td>
<td>Row 23 cell with some content</td>
<td>Row 23</td>
<td>Row 23 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 24</td>
<td>Row 24 cell with some content</td>
<td>Row 24</td>
<td>Row 24 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 25</td>
<td>Row 25 cell with some content</td>
<td>Row 25</td>
<td>Row 25 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 26</td>
<td>Row 26 cell with some content</td>
<td>Row 26</td>
<td>Row 26 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 27</td>
<td>Row 27 cell with some content</td>
<td>Row 27</td>
<td>Row 27 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 28</td>
<td>Row 28 cell with some content</td>
<td>Row 28</td>
<td>Row 28 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 29</td>
<td>Row 29 cell with some content</td>
<td>Row 29</td>
<td>Row 29 cell with more content inside of it</td>
</tr>
<tr>
<td>Row 30</td>
<td>Row 30 cell with some content</td>
<td>Row 30</td>
<td>Row 30 cell with more content inside of it</td>
</tr>
</tbody>
</table>
</body>
</html>