Jump to content

Recommended Posts

Posted

I have implemented an image fader using jQuery but on first load, you briefly see the 4 images load on top of each other.

 

i have tried to hide the images with regular javascript rather than wait until document ready but i can't track down how to solve this. can i actually get rid of this?

 

if u need the url to see, i completely understand and i can send it to u but not on a forum post.

 

i know i might have been vague but i think it's almost certainly a common problem :P

 

Thanks!

Posted

Hide them using CSS: display:none

 

Then show the first one when ur ready to show it using javascript

 

That is probably the best idea.

 

It seems that your images are being loaded before the Javascript is processed .... remember that the web still loads and processes from the top of the page down. So a sequence/placement change might solve your problem.

 

Again though, I would do as suggested above; just load the images into a hidden div and then just reset the div's display property as the first action in the script.

 

Stefan

Posted

the only thing against setting them to display:none is that people with javascript turned off (i dont know anyone who does this) won't see them at all.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...