-
Notifications
You must be signed in to change notification settings - Fork 3
/
script.js
29 lines (23 loc) · 1.08 KB
/
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 getRandomNumberPlease (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function GO () {
var numOne = getRandomNumberPlease(0, rowOne.length - 1);
var numTwo = getRandomNumberPlease(0, rowTwo.length - 1);
document.querySelector('.💩').innerHTML = rowOne[numOne];
document.querySelector('.💩💩').innerHTML = rowTwo[numTwo];
setInterval(function () {
document.querySelector('.💩').classList.add('🙋');
document.querySelector('.💩💩').classList.add('🙋');
setTimeout(function () {
var numOne = getRandomNumberPlease(0, rowOne.length - 1);
var numTwo = getRandomNumberPlease(0, rowTwo.length - 1);
document.querySelector('.💩').innerHTML = rowOne[numOne];
document.querySelector('.💩💩').innerHTML = rowTwo[numTwo];
setTimeout(function () {
document.querySelector('.💩').classList.remove('🙋');
document.querySelector('.💩💩').classList.remove('🙋');
}, 150);
}, 300);
}, 3000);
}