forked from LinZap/jquery.waterfall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (31 loc) · 1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Waterfall-Light Demo</title>
<style type="text/css">
*{margin: 0; padding:0;}
body{padding:20px;}
</style>
</head>
<body>
<div id="box"></div>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="waterfall-light.js"></script>
<script>
$(function(){
var box = $('#box');
for(var i=0;i<50;i++){
var card = $('<div>').addClass('card').css({
height: Math.floor((Math.random() * 100) + 100)+"px",
background: '#ace'
}); box.append(card);
}
// useage: fallow below
$('#box').waterfall();
//eoiwefoiwef
});
</script>
</body>
</html>