Tell us what’s happening:
Hello everybody, I’m working on the random quote generator. It is set up to where you click a button and the quote should fade out and then fade in with new quote. However, the AJAX call is replacing the quote right away, then it fades out and in again. I’m trying to make it 1) text fade out, 2) div is emptied, 3) div is replaced with new quote and 4) div is faded back in. However, the way my code is now, it’s 1) div is replaced with new quote, 2) fade out, 3)emptied and 4) fades in. Here is the codepen. Any help would be greatly appreciated!
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36.