-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
48 lines (37 loc) · 1.29 KB
/
main.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
document.addEventListener("DOMContentLoaded", function() {
document.body.style.opacity = 0;
window.setTimeout(() => {
document.body.style.transition = "opacity 2s";
document.body.style.opacity = 1;
}, 50);
alert("Welcome to Huskie Hackers!");
});
// Function to show the events content
function showEvents() {
var eventsContent = document.getElementById("events-content");
var aboutContent = document.getElementById("about-content");
if (eventsContent && aboutContent) {
eventsContent.style.display = "block";
aboutContent.style.display = "none";
// Scroll to the events content smoothly
eventsContent.scrollIntoView({ behavior: "smooth" });
}
}
// Function to show the about content
function showAbout() {
var aboutContent = document.getElementById("about-content");
var eventsContent = document.getElementById("events-content");
if (aboutContent && eventsContent) {
aboutContent.style.display = "block";
eventsContent.style.display = "none";
// Scroll to the about content smoothly
aboutContent.scrollIntoView({ behavior: "smooth" });
}
}
// Function to show the home content
function showHome() {
var homeContent = document.getElementById("hero");
if (homeContent) {
homeContent.scrollIntoView({ behavior: "smooth" });
}
}