-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
21 lines (17 loc) · 719 Bytes
/
script.js
File metadata and controls
21 lines (17 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const button = document.getElementById("moreToggle");
const content = document.getElementById("moreContent");
button.addEventListener("click", () => {
content.classList.toggle("show");
button.classList.add("clicked");
});
const scroller = document.getElementById('photoScroller');
const scrollLeftBtn = document.getElementById('scrollLeft');
const scrollRightBtn = document.getElementById('scrollRight');
if (scroller && scrollLeftBtn && scrollRightBtn) {
scrollLeftBtn.addEventListener('click', () => {
scroller.scrollBy({ left: -300, behavior: 'smooth' });
});
scrollRightBtn.addEventListener('click', () => {
scroller.scrollBy({ left: 300, behavior: 'smooth' });
});
}