forked from ademonte/pycs-layout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode.html
35 lines (31 loc) · 911 Bytes
/
code.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
<body>
<div class="gallery">
<div class="picture">
<img src="mypicture.jpg" />
</div>
<div class="picture">
<img src="mypicture1.jpg" />
</div>
<div class="picture">
<img src="mypicture2.jpg" />
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/pycs-layout.jquery.js"></script>
<script>
$(document).ready(function() {
/* Be careful, you have to wait for the images to be loaded,
otherwise pycsLayout won't have the images dimensions.
Look at the demo to see how it can be done.
*/
$(".gallery").pycsLayout({
/* The class of the elements to layout */
pictureContainer: ".picture",
/* How many pixels between each pictureContainer */
gutter: 4,
/* Height of the rows */
idealHeight: 70,
});
});
</script>
</body>