-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscript.js
More file actions
31 lines (29 loc) · 957 Bytes
/
Copy pathscript.js
File metadata and controls
31 lines (29 loc) · 957 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
28
29
30
31
function scrollToInfo() {
const infoSection = document.getElementById('info');
if (infoSection) {
infoSection.scrollIntoView({ behavior: 'smooth' });
}
}
document.addEventListener('DOMContentLoaded', function() {
const gameconsoleImg = document.getElementById('gameconsole-img');
const winSound = document.getElementById('win-sound');
if (gameconsoleImg && winSound) {
gameconsoleImg.addEventListener('click', function() {
winSound.currentTime = 0;
winSound.play();
});
}
const galleryScroll = document.getElementById('gallery-scroll');
const galleryNext = document.getElementById('gallery-next');
if (galleryScroll && galleryNext) {
galleryNext.addEventListener('click', function() {
const card = galleryScroll.querySelector('.gallery-card');
if (card) {
galleryScroll.scrollBy({
left: card.offsetWidth + 32,
behavior: 'smooth'
});
}
});
}
});