-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
27 lines (24 loc) · 725 Bytes
/
Copy pathscript.js
File metadata and controls
27 lines (24 loc) · 725 Bytes
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
// Navbar CSS property in Scroll
window.addEventListener("scroll", () => {
const navbar = document.querySelector(".navbar");
if (window.scrollY > 100) {
navbar.classList.add("scrolled");
} else {
navbar.classList.remove("scrolled");
}
});
// Profile redirecting
const profileIcon = document.querySelector(".profile-icon");
profileIcon.addEventListener("click", () => {
window.location.href = "pr-ds.html";
});
// Movie card
const movieCard = document.querselectorAll(".content-card");
movieCard.forEach((card) => {
card.addEventListener("mouseEnter", () => {
card.style.transform = "scale(1.05)";
});
card.addEventListener("mouseleave", () => {
card.style.transform = "scale(1)";
});
});