Help-random quote machine

Help-random quote machine


First of all, my code changes the background and the text together and it’s all good but it just replace the previous ones. What I would like it to do is to kind of ease in with a bit of fade effect or something. (so that it’s more aesthetic?) Is there any way to do that?
Another problem is that the background image loads very slowly sometimes. How can I fix that? Should I use an API or something?

Here’s the my code:

Thank you in advance.


I did not download all of your images, but it could be the slow ones are very large in size. You want an image that is large in dimensions but small in terms of over all file size. The larger the file size, the slower it will load. One way to offset having to load them when a new quote is requested, is to 'preload" the images. You can do a search of the forum or google on preloading images using JavaScript, to find many opinions on how best to implement.


Oh I see, thanks a lot!