-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
53 lines (43 loc) · 809 Bytes
/
script.js
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
let t1 = gsap.timeline({paused: true, reserved: true});
const bookNow = document.querySelector('.book')
const cancel = document.querySelector('.cancel')
bookNow.addEventListener('click', e => {
t1.play();
})
cancel.addEventListener('click', e => {
t1.reverse();
})
t1.to(
".body", {
ease: "power1.inOut",
marginTop: 0,
}, 0
);
t1.to(
".header button", {
ease: "power1.inOut",
opacity: 0,
scale: 0,
}, 0
);
t1.to(
".book", {
ease: "power1.inOut",
opacity: 0,
}, 0
);
t1.to(
".cancel", {
ease: "power1.inOut",
right: 20,
opacity: 1
}, 0
);
t1.to(
".booking-container", {
ease: "power1.inOut",
marginTop: -210,
zIndex: 10,
height:500
}, 0
);