<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
// Get the audio element
const bgMusic = document.getElementById('bg-music');
// Get the button element
const audioButton = document.querySelector('.audio-button');
// Add a click event listener to toggle the audio
playback
audioButton.addEventListener('click', function() {
if (bgMusic.paused) {
bgMusic.play();
} else {
bgMusic.pause();
}
});
}, false);
</script>