-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
113 lines (86 loc) · 3.45 KB
/
script.js
File metadata and controls
113 lines (86 loc) · 3.45 KB
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
document.addEventListener('DOMContentLoaded', () => {
const greenButton = document.querySelector('.green-button');
const bannerButton = document.querySelector('.banner-btn');
const contactButton = document.querySelector('.button-container button');
if (greenButton) {
greenButton.addEventListener('click', () => {
alert('Your Explore More button was clicked!');
console.log('Green button clicked at:', new Date().toLocaleTimeString());
});
}
if (bannerButton) {
bannerButton.addEventListener('click', () => {
alert('You clicked the Submit button!');
console.log('Banner button clicked at:', new Date().toLocaleTimeString());
});
}
if (contactButton) {
contactButton.addEventListener('click', () => {
alert('You clicked the Contact Today button!');
console.log('Contact button clicked at:', new Date().toLocaleTimeString());
});
}
const phoneNumber = document.querySelector('.number h3');
const emailAddress = document.querySelector('.mail h3');
const facebookIcon = document.querySelector('.fa-facebook');
const twitterIcon = document.querySelector('.fa-twitter');
const linkedinIcon = document.querySelector('.fa-linkedin');
if (phoneNumber) {
phoneNumber.addEventListener('click', () => {
alert('You clicked on the phone number!');
});
}
if (emailAddress) {
emailAddress.addEventListener('click', () => {
alert('You clicked on the email address!');
});
}
if (facebookIcon) {
facebookIcon.addEventListener('click', () => {
window.open('https://www.facebook.com/', '_blank');
});
}
if (twitterIcon) {
twitterIcon.addEventListener('click', () => {
window.open('https://twitter.com/', '_blank');
});
}
if (linkedinIcon) {
linkedinIcon.addEventListener('click', () => {
window.open('https://www.linkedin.com/', '_blank');
});
}
const footerText = document.querySelector('.footer-text p');
const footerFacebook = document.querySelector('.footer-social .fa-facebook');
const footerTwitter = document.querySelector('.footer-social .fa-twitter');
const footerLinkedin = document.querySelector('.footer-social .fa-linkedin');
if (footerFacebook) {
footerFacebook.addEventListener('click', () => {
alert('You clicked the Facebook icon!');
});
}
if (footerTwitter) {
footerTwitter.addEventListener('click', () => {
alert('You clicked the Twitter icon!');
});
}
if (footerLinkedin) {
footerLinkedin.addEventListener('click', () => {
alert('You clicked the LinkedIn icon!');
});
}
const mobileMenu = document.querySelector('.hamburger-menu-mobile');
if (mobileMenu) {
const mobileButton = mobileMenu.querySelector('.hamburger-icon');
mobileButton.addEventListener('click', () => {
mobileMenu.classList.toggle('active');
});
}
const mediumMenu = document.querySelector('.hamburger-menu-medium');
if (mediumMenu) {
const mediumButton = mediumMenu.querySelector('.hamburger-icon');
mediumButton.addEventListener('click', () => {
mediumMenu.classList.toggle('active');
});
}
});