-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
114 lines (103 loc) · 3.61 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
103
104
105
106
107
108
109
110
111
112
113
114
$(".Available-cnt").hide();
function availableSoon() {
$(".Available-cnt").show();
$(".navbar").hide();
$("footer").hide()
$("header").hide();
$(".book-now-fixed").hide()
}
$(document).ready(function () {
$("#booking-window").click(function () {
$(".Booking-window").show();
$(".navbar").hide();
$("footer").hide()
$("header").hide();
});
$("strong").click(function () {
$(".Booking-window").show();
$(".navbar").hide();
$("footer").hide()
$("header").hide();
$(".book-now-fixed").hide()
});
$(".book-now-img").click(function () {
$(".Booking-window").show();
$(".navbar").hide();
$("footer").hide()
$("header").hide();
$(".book-now-fixed").hide()
});
$(".nav-link").hover(function () {
const hr = document.createElement("hr");
hr.style.margin = "1px"
$(hr).animate({ width: "100%", opacity: 1 });
$(this).append(hr);
}, function () {
$(this).find("hr").stop().animate({ width: "0", opacity: 0 }, 400, function () {
$(this).remove(); // Remove the hr after animation
});
});
$(".form-submit").hide();
$("#signup-btn").click(function () {
var ackText = document.getElementByClassName('submit-text');
ackText.innerHTML = "You are Successfully registered ";
$(".form-submit").show();
});
$(".login-button").click(function () {
$(".login-show").show();
$(".navbar").hide();
$(".loginClass").show();
$(".book-now-fixed").hide()
});
$(".register-button").click(function () {
$(".register-show").show();
$(".navbar").hide();
$(".registerClass").show();
$(".book-now-fixed").hide();
});
$(".address-button").click(function () {
$(".navbar").hide();
$(".address").show(); $(".book-now-fixed").hide()
});
$(".close").click(function () {
$(".login-show").hide();
$(".register-show").hide();
$(".navbar").show();
$(".address").hide()
$(".backdrop-effect").hide();
$(".Booking-window").hide()
$("footer").show()
$("header").show();
$(".Available-cnt").hide();
$(".book-now-fixed").show()
});
$(".move-to-login").click(function () {
$(".login-show").show();
$(".registerClass").hide();
$(".navbar").hide();
$(".address").hide()
$(".loginClass").show();
});
$(".move-to-register").click(function () {
$(".register-show").show();
$(".loginClass").hide();
$(".navbar").hide();
$(".address").hide()
$(".registerClass").show();
});
$screenWidthCheck = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
if ($screenWidthCheck > 759) {
$(".main").hide();
$(".sidebar").hide();
}
if ($screenWidthCheck < 758) {
$(".menu").click(function () {
document.querySelector(".sidebar").style.display = "flex";
document.querySelector(".menu").style.display = "none";
});
$(".sidebar").click(function () {
document.querySelector(".sidebar").style.display = "none";
document.querySelector(".menu").style.display = "flex";
});
}
});