Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Of course, he could have a div that's meant to only appear when he's in the "loading" state. Commented Aug 22, 2012 at 16:19
  • I took most of this idea, but I changed it. I put in some javascript to set the "loading" class on the body (the body comes from somebody else's framework, which is why I don't add it directly) and then in the document ready script, I remove the class before the .on call. That seems to be, as @JayC said above, enough of a hint to the browser to load that image before I need it. Commented Aug 22, 2012 at 16:40