RubenErhardt / your-tribe-profile-card

Maak met HTML, CSS en JavaScript een visitekaartje
https://rubenerhardt.github.io/your-tribe-profile-card/
MIT License
0 stars 0 forks source link

style.display weg uit javascript #4

Closed RubenErhardt closed 1 month ago

RubenErhardt commented 1 month ago
 function playAudio() {
        audioElement?.play();
        if (hiddenSection) {
            hiddenSection.classList.remove('hidden');
            hiddenSection.scrollIntoView({ behavior: 'smooth', block: 'center' });
        }
    }

    function toggleMoreInfo() {
        if (moreInfo) {
            moreInfo.classList.toggle('hidden');
            revealButton.textContent = moreInfo.classList.contains('hidden') ? 'Click to reveal more' : 'Click to hide';
        }
    }
.hidden {
    display: none;
}