I’m using jquery.load to pull in a fragment of html from another page. The fragment contains quite a large background image. Once the load function has finished and it calls it’s callback I set the fragment to display block in the page – problem is that as the html loads I see the new content without the background image….the background image loads later.
Whats a good method of making sure the image is loaded before I show the ajax content?
You could do this…
jsFiddle.