-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
72 lines (54 loc) · 1.79 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Popcorn.js scrolling demo</title>
<!-- Load jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<!-- Load ScrollTo -->
<script src="js/jquery/jquery.scrollTo.js"></script>
<!-- Load Popcorn stuff -->
<script src="js/popcorn/popcorn-complete.js"></script>
<script src="js/popcorn/popcorn.scrolling.js"></script>
<!-- Load CSS -->
<link rel="stylesheet" href="style.css" type="text/css" media="screen"/>
<!-- javascript that will initiate jQuery and the LocalScroll plugin -->
<script>
// When the document is loaded...
$(document).ready(function() {
// Create a popcorn instance by calling Popcorn("#id-of-my-video")
var pop = Popcorn("#ourvideo")
// Scroll the page
.scrolling({
start: 0,
end: 1,
target: 'box1'
})
.scrolling({
start: 2,
end: 3,
target: 'box2'
})
.scrolling({
start: 3,
end: 4,
target: 'box3'
})
// Play the video right away
.play();
});
</script>
</head>
<body>
<video height="180" width="300" id="ourvideo">
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.mp4"></source>
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.ogv"></source>
<source src="http://videos.mozilla.org/serv/webmademovies/popcornplug.webm"></source>
</video>
<div id="box1" class="box">Box #1</div>
<div id="box2" class="box">Box #2</div>
<div id="box3" class="box">Box #3</div>
<div id="box4" class="box">Box #4</div>
</body>
</html>