Skip to content

Commit

Permalink
Update reworkedupdates.html
Browse files Browse the repository at this point in the history
  • Loading branch information
DW-Studios authored Dec 26, 2024
1 parent 8c14154 commit bc866f3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions reworkedupdates.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,29 @@ <h1>Bienvenido a la sección de actualizaciones</h1>
</div>

</body>

<script>
// Función para reproducir un sonido
function playSound(audioFile) {
const audio = new Audio(audioFile);
audio.play();
}

// Obtener todos los enlaces del side nav
const navLinks = document.querySelectorAll('.sidenav a');

// Agregar los eventos hover y click
navLinks.forEach(link => {
// Reproducir sonido cuando el mouse pasa sobre el enlace
link.addEventListener('mouseenter', () => {
playSound('Sounds/Select.wav');
});

// Reproducir sonido cuando se hace clic en el enlace
link.addEventListener('click', () => {
playSound('Sounds/Click.wav');
});
});
</script>

</html>

0 comments on commit bc866f3

Please sign in to comment.