forked from artfinder/jquery-equal-height
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
86 lines (84 loc) · 1.84 KB
/
example.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
<!DOCTYPE html>
<html lang='en-gb'>
<head>
<title>equal height thingies</title>
<style>
body {
width: 800px;
}
ul {
outline: 1px solid black;
width: 750px;
margin: 0;
}
li {
list-style: none;
width: 230px;
margin: 10px;
float: left;
}
li p {
background: #ccc;
padding: 10px;
}
</style>
</head>
<body>
<h1>Equal height children example</h1>
<h2>Without any JS applied</h2>
<ul>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>
I am a much bigger thing. Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
</ul>
<h2>With JS applied</h2>
<ul data-equal-height='li p'>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>
I am a much bigger thing. Lorem ipsum dolor sit amet, consectetur
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua.
</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
<li>
<p>I am a thing.</p>
</li>
</ul>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script src='https://raw.github.com/devfort/jquery-equal-height/master/devfort.equal-height.js'></script>
<script>
$('[data-equal-height]').make_children_equal_height();
</script>
</body>
</html>