View Single Post
Old 12-12-2012, 11:57 AM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
jQuery (and JS) do not wait for the function to complete before executing statements.

A couple of ways of doing this this are outlined here.

You might also consider pre-caching the big image(s). That is, creating new Image()'s and setting their src to the big images as, or just after, the page has loaded.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
cyphix (12-12-2012)