Not able to get new quote for Random Quote Generator

Hi all!

I’ve been trying the challenge for the Random Quote Generator and am currently stuck.

I can’t seem to generate a new quote after the initial quote is generated.

Here is my pen:

What am I missing here?

Cheers,
Yosef

I did a little research and played around with the Pen. From what I’ve found, the getJSON is caching the result, hence why it only shows the first quote and nothing else.

Try adding this to your code, right before the click listener:
$.ajaxSetup({ cache: false });

I tried it out in your pen and it seemed to work, generating different quotes.

Hope it helps! :slight_smile:

1 Like