-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
29 lines (23 loc) · 985 Bytes
/
script.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
function ready() {
console.log('DOM Carregado!');
}
document.addEventListener("DOMContentLoaded", ready);
function aperta() {
const UnHideIt = document.querySelector('#toggle-hidden');
const UnHideItImage = document.querySelector('#image-hidden');
let randomNumber = Math.floor(Math.random() * 2);
if (randomNumber === 0) {
document.getElementById('irasumir').style.display = 'none';
UnHideIt.classList.remove('hidden');
UnHideItImage.classList.remove('hidden');
UnHideIt.innerHTML = 'ESTAMOS NAMORANDO AGORA!';
document.getElementById('background').style.backgroundColor = '#c1121f';
} else {
UnHideIt.classList.remove('hidden');
UnHideIt.innerHTML = 'VOCÊ ESTÁ SOLTEIRO(A), TENTE NOVAMENTE!';
UnHideItImage.classList.add('hidden');
document.getElementById('background').style.backgroundColor = '#231942';
};
console.log(UnHideIt);
console.log(randomNumber);
}