Randome quote machine to slowly loading quotes


I’m almoste finished my Randome quote machine but still have some questions

When I click button the new quote loadign very slowly.
Is it because I’m using bad url for my project or why?

When I clicked the Twitter, twitter button changing the background-color of block
I can’t understan why?

here is my code


if your quotes load too slowly, preload them mebbe?

1 Like

Like @Xiija suggested, you should download the quotes and then pull a random quote from the downloaded array of quotes instead of pulling the entire list of quotes for each new quote. You may want to have a default message displayed like “Loading Quotes…” while waiting for response to come back from the only call to the API.

1 Like

I will try it