| 48 | var cookieRight = document.querySelector(".cookieRight"); |
| 49 | var count = 0; |
| 50 | function displayFortune() { |
| 51 | paper.classList.remove("animatePaper"); |
| 52 | cookieLeft.classList.remove("animateCookieLeft"); |
| 53 | cookieRight.classList.remove("animateCookieRight"); |
| 54 | paper.innerHTML = ""; |
| 55 | |
| 56 | setTimeout(function () { |
| 57 | paper.classList.add("animatePaper"); |
| 58 | cookieLeft.classList.add("animateCookieLeft"); |
| 59 | cookieRight.classList.add("animateCookieRight"); |
| 60 | }, 1000); |
| 61 | |
| 62 | var num = Math.floor(Math.random() * 42); |
| 63 | |
| 64 | setTimeout(function () { |
| 65 | paper.innerHTML = fortunes[num]; |
| 66 | }, 2000); |
| 67 | } |