-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
177 lines (113 loc) · 3.47 KB
/
index.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
// -------------------------navbar--------------------------
// let displaywid=document.getElementsB("body").value;
// if(displaywid<=1200){
let x= document.getElementById("navi")
x.style.display="block"
function menuitem(){
if(x.style.display=="none"){
x.style.display="block"
}
else{
x.style.display="none"
}
}
// }
// -------------------------login--------------------------
let y= document.getElementById("login")
y.style.display="none"
function loginPage(){
if(y.style.display=="none"){
y.style.display="flex"
}
else{
y.style.display="none"
}
}
document.getElementById("btn1").addEventListener("click", loginfun)
function loginfun(){
let storedem = document.getElementById("email2").value
let storedpas = document.getElementById("password2").value
alert("Account Created Successfully")
localStorage.setItem("storedemail",storedem)
localStorage.setItem("storedpassword",storedpas)
}
// ---------------------first slider-----------------------
let prev = document.getElementById('previous');
let next = document.getElementById('next');
let arr = ["images/img1.jpg", "images/img4.jpg", "images/img5.jpg",
"images/img6.jpg", "images/img7.jpg"];
let i = 0;
next.addEventListener('click', function () {
i++;
if (i > arr.length - 1) {
i = 0;
}
document.getElementById('image').src = arr[i];
})
prev.addEventListener('click', function () {
i--;
if (i < 0) {
i = arr.length - 1;
}
document.getElementById('image').src = arr[i];
})
function slides() {
document.getElementById("image").src = arr[i];
if (i < arr.length - 1) i++;
else i = 0;
}
setInterval(slides, 3500);
// ---------------------second slider-----------------------
let prev2 = document.getElementById('previous2');
let next2 = document.getElementById('next2');
let arr2 = ["images/img2-1.jpg", "images/img2-2.jpg", "images/img2-3.jpg"];
let j=0;
next2.addEventListener('click', function () {
j++;
if (j > arr2.length - 1) {
j = 0;
}
document.getElementById('image2').src = arr2[j];
})
prev2.addEventListener('click', function () {
j--;
if (j < 0) {
j = arr2.length - 1;
}
document.getElementById('image2').src = arr2[j];
})
function slides2() {
document.getElementById("image2").src = arr2[j];
if (j < arr2.length - 1) j++;
else j = 0;
}
setInterval(slides2, 2000);
// ---------------------feedback-----------------------
let v= document.getElementById("feedback")
v.style.display="none"
function menuitem2(){
if(v.style.display=="none"){
v.style.display="block"
}
else{
v.style.display="none"
}
}
let x2= document.getElementById("feedback")
x2.style.display="none"
function feedbackPage(){
confirm("Do You Want To Close This Feedback Form")
if(x2.style.display=="none"){
x2.style.display="flex"
}
else{
x2.style.display="none"
}
}
function massage(){
let mass= document.getElementById("textarea").value
alert("your Feedback has been Submitted")
localStorage.setItem("massage",mass)
}
// --------------------------feedback---------------------------
// ---------------------*---------------------*---------------------*---------------------