-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.html
More file actions
52 lines (40 loc) · 1.31 KB
/
sample.html
File metadata and controls
52 lines (40 loc) · 1.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Scrollshow Demo</title>
<style>
body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; font-size: 13px; }
.contentblock { height: 250px; background-color: red; }
.contentblock:nth-child(2n) { background-color: blue; }
</style>
</head>
<body>
<div class="scrollshow">
<div class="contentblock">A content block</div>
<div class="contentblock">A content block</div>
<div class="contentblock">A content block</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="scrollshow.js" type="text/javascript"></script>
<script>
var d;
$(document).ready(function(e) {
scrollShowSetup();
});
function scrollShowSetup(){
/* SCROLLSHOW DEMO */
d = $(".scrollshow .contentblock:last-child").scrollshow( {
callback : loadNextContentElement
} );
}
var _max = 10;
function loadNextContentElement(){
if( $(".scrollshow .contentblock").length < _max ){
$(".scrollshow").append('<div class="contentblock">A content block</div>');
scrollShowSetup();
}
}
</script>
</body>
</html>