I am creating a popup for a site with jquery animation. My problem: sometimes (before the page and images are cached by the browser) loading the images in an order that reduces the quality of the animation.
Ok, here's what I did: the div container has the following css: background:url(images/colorcity.png)if js is turned on, I apply a grayscale <img>to colorcity, whose opacity is animated to 0 for a nice “fade color” effect. for this i use:$("#container").prepend('<img src="images/greycity.png" class="grey" />')
What I'm trying to do somehow makes this preview image the first thing to display on the page, as it will “hide” other images used in the animation. Unfortunately, all my attempts have failed.
I guess this is a common problem, and probably this is a recurring question, but I could not find the answer in an hour or two. So sorry if I noob lol.
Thank you for your help.
Page: http://roughgiraffed.com/barrandbarrbags/
source
share