-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu.js
30 lines (28 loc) · 1.2 KB
/
menu.js
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
const cards = document.querySelectorAll('.caixa__card');
cards.forEach(card => {
card.addEventListener('click', () => {
let url;
if (card.classList.contains('alimentos')) {
url = 'Alimentos/alimentos.html';
} else if (card.classList.contains('dicionario')) {
url = 'Dicionario/dicionario.html';
} else if (card.classList.contains('lugaresbiblicos')) {
url = 'Lugaresbiblicos/lugaresbiblicos.html';
} else if (card.classList.contains('nomebiblicos')) {
url = 'Nomebiblicos/nomebiblicos.html';
} else if (card.classList.contains('nomecarros')) {
url = 'Nomecarros/nomecarros.html';
} else if (card.classList.contains('nomedesenhos')) {
url = 'Nomedesenhos/nomedesenhos.html';
} else if (card.classList.contains('nomejogos')) {
url = 'Nomejogos/nomejogos.html';
} else if (card.classList.contains('nomepessoas')) {
url = 'Nomepessoas/nomepessoas.html';
} else if (card.classList.contains('timefutebol')) {
url = 'Timesfutebol/timesfutebol.html';
}
if (url) {
window.open(url, '_self');
}
});
});