-
Notifications
You must be signed in to change notification settings - Fork 11
/
index.html
283 lines (222 loc) · 7.16 KB
/
index.html
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!doctype html>
<html lang="nl">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!--
This website was carefully constructed by
Interactive Studios
http://www.interactivestudios.nl
-->
<title>EqualHeightColumns test</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<style type="text/css">
.blocks, .blocks-2{
list-style: none;
width: 50%;
margin: 0px auto;
overflow: hidden;
margin-bottom: 20px;
}
.blocks li{
background: #eee;
margin: 0 1% 10px;
padding: 0 2%;
width: 27.33333%;
float: left;
}
.blocks-2 li{
background: #eee;
margin: 0 1% 10px;
padding: 0 2%;
width: 100px;
float: left;
}
img{
max-width: 100%;
}
</style>
</head>
<body>
<ul class="blocks test-1">
<li>
<h2>jQuery Equal Height Columns</h2>
<p>This plugin makes multiple elements as high as the tallest element among them.</p>
<p>It also works great for responsive and fluid designs.</p>
</li>
<li>
<h2>But does it have a lot of options I can set myself?.</h2>
<p>There are three options you can set. MaxWidth is probably useless, but hey, it's there if you want to use it.</p>
<p><strong>minWidth</strong>: The plugin won't do anything unless the width is wider than this value</p>
<p><strong>maxWidth</strong>: The plugin won't do anything unless the width is smaller than this value</p>
<p><strong>setHeightOn</strong>: The css attribute on which the height gets set.</p>
</li>
<li>
<h2>Does it have downsides?</h2>
<p>Yes. It works best on colums which are on a single line. If they span more lines the plugin won't take into account that each row probably would be better of with a different height. Now every row will have the height of the tallest element in the entire selection.</p>
<p>Second, you can only have a single (configurable) bounded range for which the plugin kicks-in. This could be a problem in certain responsive websites.</p>
</li>
</ul>
<ul class="blocks test-2">
<li>
<div class="text">
<h2>Why this plugin?</h2>
<p><strong>You could do this with tables right?</strong> Yes, but it's not semantic. Also it's not flexible enough for responsive websites.</p>
<p><strong>But... Flexbox?</strong> It's possible, on IE10+.</p>
<p><strong>What about display: table-cell;?.</strong> A bit better support, but you can't pull of example 2.</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<h2>About example 1 (look up)</h2>
<p>It uses the minWidth and maxWidth options. You can see this in effect when you resize your your browser window.</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<h2>About example 2</h2>
<p>This example wraps the main text in a wrapper div, followed by an <a> element. The plugin works it's magic on the wrapper div, which results in the links neatly matching up vertically.</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
</ul>
<ul class="blocks test-3">
<li>
<div class="text">
<h2>Why this plugin?</h2>
<p>
<img src="http://www.placehold.it/300x400" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<h2>About example 1 (look up)</h2>
<p>
<img src="http://www.placehold.it/300x600" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<p>
<img src="http://www.placehold.it/500x300" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
</ul>
<ul class="blocks test-4">
<li>
<div class="text">
<h2>Why this plugin?</h2>
<p>
<img src="http://www.placehold.it/300x400" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<h2>About example 1 (look up)</h2>
<p>
<img src="http://www.placehold.it/300x600" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
<li>
<div class="text">
<p>
<img src="http://www.placehold.it/500x300" />
</p>
</div>
<p><a href="#">Don't read more</a></p>
</li>
</ul>
<ul class="blocks test-5">
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda blanditiis consequuntur dolores.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda.
</li>
<li>
Lorem ipsum dolor sit amet.
</li>
<li>
Lorem ipsum dolor.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad assumenda delectus dolores esse perferendis provident quod similique voluptatem.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda blanditiis consequuntur dolores. Aliquid eius esse, explicabo ipsam libero nemo possimus provident temporibus voluptate voluptatem. Aliquid eius esse, explicabo ipsam libero nemo possimus provident temporibus voluptate voluptatem.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda.
</li>
</ul>
<ul class="blocks-2 test-6">
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda blanditiis consequuntur dolores.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda.
</li>
<li>
Lorem ipsum dolor sit amet.
</li>
<li>
Lorem ipsum dolor.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad assumenda delectus dolores esse perferendis provident quod similique voluptatem.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda blanditiis consequuntur dolores. Aliquid eius esse, explicabo ipsam libero nemo possimus provident temporibus voluptate voluptatem. Aliquid eius esse, explicabo ipsam libero nemo possimus provident temporibus voluptate voluptatem.
</li>
<li>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus adipisci assumenda.
</li>
</ul>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="jquery.equalheightcolumns.js"></script>
<script>
$('.test-1 li').equalHeightColumns({
minWidth: 500,
maxWidth: 1000
});
$('.test-2 .text').equalHeightColumns();
$('.test-3 .text').equalHeightColumns();
$('.test-4 .text').equalHeightColumns({
afterLoading : 'iframe',
afterTimeout : 500
});
$('.test-5 li').equalHeightColumns({
//checkHeight: 'height',
equalizeRows: true
});
$('.test-6 li').equalHeightColumns({
//checkHeight: 'height',
equalizeRows: true
});
</script>
</body>
</html>