-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
66 lines (57 loc) · 1.44 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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Pratham Navigation</h1>
<div class="toggle-btn">
<span class="one"></span>
<span class="two"></span>
</div>
<div class="menu">
<div class="data">
<ul>
<li>Navigation</li>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Our Story</a></li>
</ul>
</div>
</div>
<script type="text/javascript">
var t1=new TimelineMax({paused:true});
t1.to(".one",0.8,{
y:6,
rotation:45,
ease:Expo.easeInOut
});
t1.to(".two",0.8,{
y:-6,
rotation:-45,
ease:Expo.easeInOut,
delay:-0.8
});
t1.to(".menu",2,{
top:"0%",
ease:Expo.easeInOut,
delay:-2
});
t1.staggerFrom(".menu ul li",2, {
x:-200,opacity:0,ease:Expo.easeOut
},0.3);
t1.reverse();
$(document).on("click",".toggle-btn",function(){
t1.reversed(!t1.reversed());
});
$(document).on("click","a",function(){
t1.reversed(!t1.reversed());
});
</script>
</body>
</html>