I have an animation that fades in after around 1 second of the user clicking on the webpage. However, as the text that fades in is white, it requires the background image to be loaded already before this happens.
Given that some of my users may have a slow internet connection, I want to delay the animation until the background image has loaded?
Do you have any recommendations on how to do this?
I was thinking that it might be possible to create a JQuery script that only creates the animation class using the Document Ready function.
However, I have no knowledge in this, as my use of Javascript so far is very limited beyond online tutorials.
Could somebody please provide a quick JSfiddle as to how to only start the animation once the image loads?