Randome quote machine to slowly loading quotes

Randome quote machine to slowly loading quotes
0.0 0

#1

Hello,

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
codepen


#2

onclick=“colorChange()”>Tweet<

if your quotes load too slowly, preload them mebbe?


#3

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.


#4

Thanks
I will try it