Forum Moderators: open

Message Too Old, No Replies

all images flash on page on page load

jquery slideviewer problem

         

SBee

5:46 pm on Jul 29, 2009 (gmt 0)

10+ Year Member



Hi-

I am using a nice little jquery image slider. Mostly working well - but the page loads -all of the images in the viewer briefly flash down the page on page load. this won't work. Only one at a time should be visible.

Here is a link to the issue:

<snipped url>

Is this an image preloading issue? I have a preloader script in there - but not sure if it is working as it should.
Or do i need to hide the div or something else?

Thank you!

[edited by: whoisgregg at 5:22 pm (utc) on July 30, 2009]
[edit reason] Whoops, no URLs please. See TOS [webmasterworld.com] :) [/edit]

whoisgregg

5:39 pm on Jul 30, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are the images defined? Are they in an <ul> or a <div>? It could be that between when the page loads and the script loads the browser has already started loading and displaying the images.

If that's the case, you could use CSS to hide the images and then have your script display the images once it loads. Or, you could use CSS to style the non-javascript version to make it take up the same space as the javascript version. That way it will still start loading the images but won't be "jumpy" when the page reflows.

Feel free to post short code snippets of your preloader script if you think that's the culprit. Also, a short code sample of how the images are defined in the source code might be helpful (just change the URLS to "example.com" before posting).

:)