-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.js
33 lines (27 loc) · 1.04 KB
/
home.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
console.log("Nour");
/* #navbar */
const togglebtn=document.querySelector('.toggle-btn')
const togglebtnimg=document.querySelector('.toggle-btn i')
const dropdown=document.querySelector('.dropdown_menu')
togglebtn.onclick=function (){
dropdown.classList.toggle('open')
const isopen=dropdown.classList.contains('open')
togglebtnimg.classList=isopen
?'fa-solid fa-xmark': 'fa-solid fa-bars'
}
/********************** */
/**hotel sections */
function openCity(evt,hobby) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(hobby).style.display = "block";
evt.currentTarget.className += " active";
}
document.getElementById("defaultOpen").click();