-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
callback.html
47 lines (36 loc) · 1.27 KB
/
callback.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Parallax.js | Callback Example</title>
<!-- Behavioral Meta Data -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>
<div id="container" class="container">
<div id="scene" class="scene">
<div data-depth="1.00"><img src="images/layer1.png"></div>
<div data-depth="0.80"><img src="images/layer2.png"></div>
<div data-depth="0.60"><img src="images/layer3.png"></div>
<div data-depth="0.40"><img src="images/layer4.png"></div>
<div data-depth="0.20"><img src="images/layer5.png"></div>
<div data-depth="0.00"><img src="images/layer6.png"></div>
</div>
</div>
<!-- Scripts -->
<script src="./parallax.js"></script>
<script>
function myAwesomeCallback() {
alert('Parallax is ready to go now!');
}
// the onReady function is called as soon as Parallax knows what input method to use. This might take up to 1000ms (supportDelay * 2) after initialisation
var scene = document.getElementById('scene');
var parallax = new Parallax(scene, {
onReady: myAwesomeCallback
});
</script>
</body>
</html>