> A) the images very quickly load then disapper. I dont want to hide the images 
> in css incase people have js diasbled.
You're out of luck, then. DOMReady will trigger after the images and
html has loaded, so unless you hide them with CSS, there's no way to
prevent the flash, afaik.

> B) all the images load together which is making me think that i have
> something wrong somewhere.
What do you mean, load together? Chances are, the images finish
loading during the 2 second fade in, giving the appearance they are?
Also, if you have the images cached by having visited the page before,
they should all come up within seconds of each other.

On Apr 27, 4:18 pm, David <davidgsw...@gmail.com> wrote:
> Hi, im a totally beginner so this may be obvious but im stuck!!!
>
> I have image galleries on my site and i want the images to fade in
> after loading, at the moment i have the following script:
>
> Code:
>
> $(function() {
>
>       $("div#media-gallery ul li img").css("display","none");
>       $("div#media-gallery ul li img").fadeIn(2000);
>
> });
>
> Which almost does what i want but....
>
> A) the images very quickly load then disapper. I dont want to hide the
> images in css incase people have js diasbled.
> B) all the images load together which is making me think that i have
> something wrong somewhere.
>
> the markup for the div in question is:
>
> Code:
>
> <div id="media-gallery">
> <h2>Media Gallery</h2>
> <ul>
> <li>
> <a href="HYPERLINK"><img src="IMG SOURCE" /></a>
> </li>
> <li>
> <a href="HYPERLINK"><img src="IMG SOURCE" /></a>
> </li>
> </ul>
> </div>
>
> With HYPERLINK and IMG SOURCE being actual urls.
>
> Hope someone can help me with this, i have looked around but cant find
> an answer anywhere.
>
> David

Reply via email to