var audioBtn = document.getElementById('audio_btn');
var newsBtn = document.getElementById('news_buttn');
var museumBtn = document.getElementById('museum_buttn');
var audioBlock = document.querySelector('.audioGid');
var newsBlock = document.querySelector('.news');
var museumBlock = document.querySelector('.museumOnline');
audioBtn.addEventListener('click', audioRules);
newsBtn.addEventListener('click', n3wsFunc); // Изменено здесь
museumBtn.addEventListener('click', mus3umFunc); // Изменено здесь
function audioRules(event) {
event.preventDefault();
console.log('printed');
audioBlock.style.display = 'block';
newsBlock.style.display = 'none';
museumBlock.style.display = 'none';
};
function n3wsFunc(event) {
event.preventDefault();
console.log('printed');
audioBlock.style.display = 'none';
newsBlock.style.display = 'block';
museumBlock.style.display = 'none';
};
function mus3umFunc(event) {
event.preventDefault();
console.log('printed');
audioBlock.style.display = 'none';
newsBlock.style.display = 'none';
museumBlock.style.display = 'block';
};
почему не работают последние две?
html
js