-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrollCube.html
80 lines (58 loc) · 1.73 KB
/
ScrollCube.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
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<Title>Cube Transition</Title>
<link href="ScrollCube.css">
</head>
<body>
<div id="cube-trans">
<div class="page1"></div>
<div class="page2"></div>
<div class="page3"></div>
<div class="page4"></div>
</div>
<ul id="bullets"></ul>
<script>
function animationIn(i){
console.log(i, 'i\'m in')
switch(i){
case 1:
$('.page2 h2').fadeIn();
break;
case 2:
$('.page3 h2').animate({top: '40%', left:'30%'}, 1000);
break;
case 3:
setTimeout(function)(){
$('.page4 h2').addClass('ani')
}, 0)
break;
default:
;
}
}
function animationOut(i){
console.log(i, 'i\'m out')
switch(i){
case 1:
$('.page2 h2').fadeOut();
break;
case 2:
$('.page3 h2').animate({top: 0, left: 0}, 1000);
break;
case 3:
setTimeout(function)(){
$('.page4 h2').removeClass('ani')
}, 0)
break;
default:
;
}
}
</script>
<script src="cubeTransition.js-master/js/wheel-indicator.js"></script>
<script src="cubeTransition.js-master/js/jquery.touchSwipe.js"></script>
<script src="cubeTransition.js-master/js/cubeTransition.js"></script>
</body>
</html>