-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
102 lines (73 loc) · 1.99 KB
/
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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
var slide_2 = document.querySelector(".p1").style
slide_2.transform = "translateX(100%)"
function slider() {
slide_2.transform = "translateX(0%)"
slide_2.transition="all 0.3s"
}
function slide() {
slide_2.transform = "translateX(100%)"
slide_2.transition = "all 0.01s"
}
window.onscroll = function()
{
scrollfunction()
}
function scrollfunction()
{
if (document.body.scrollTop < 50 && document.documentElement.scrollTop > 50) {
var nav= document.getElementById("nav1").style;
nav.backgroundColor = "rgba(0,0,0,.5)";
nav.height="15vh";
nav.transitionDuration="1s";
}
else {
var nav1= document.getElementById("nav1").style;
nav1.backgroundColor = "transparent";
nav1.height="18vh"
}
}
var sub_slider=document.querySelector(".sub-slider-1").style;
var parent=document.querySelector(".p6").style;
parent.transitionDuration="2s"
sub_slider.backgroundImage ="linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5))"
var sub_slider_1 = document.querySelector(".sub-slider-2").style;
sub_slider_1.backgroundImage ="linear-gradient(rgba(0,0,0,0.5),rgba(0,0,0,0.5))"
function sub_1(){
sub_slider.transition = "all 0.05s"
if (x == 1) {
parent.left = "-75%"
x = 0
sub_slider_1.backgroundImage = "none"
}
else if (x == 0) {
parent.left = "-150%"
x = 1
sub_slider.backgroundImage ="none"
}
}
var x = 1
function sub() {
if(x==1){
parent.left = "-75%"
x=0
}
else if(x==0){
parent.left = "0%"
x=1
}
sub_slider_1.transition = "all 0.05s"
}
var msg = document.querySelector(".message-div").style;
var l=1
function send_msg(){
if(l==1){
msg.visibility= "hidden"
msg.transition = "all 0.5s"
l=0
}
else if(l==0){
msg.visibility= "visible"
msg.transition = "all 0.5s"
l = 1
}
}