views:

116

answers:

2

Need a webpage which displays an image for x number of seconds and then fades into another image which also contains a clickable link.

How do I achieve this with javascript? I know this can be done in Flash but it needs to be iPhone compatible.

+2  A: 

Checkout the jQuery Cycle Plugin for a Master's Class on manipulating images with JS for galleries and such. Well written, well documented.

Many other good ones out there. Luke, Use the Source! and learn.

Peter Rowell
I think your link killed itself :) Another way of doing this manually would be to use jQuery's fadeIn/Out effect, using the callback to initiate a timer, pretty straight forward to do by hand.
Jay
@Jay: Remember links don't kill links, people do! Thanks for the heads up. I agree the fadeIn/fadeOut is good, I was just trying to point him at the All Singing, All Dancing version. I find I always learn more from seeing how a real Pro does it.
Peter Rowell
Thanks guys. I'm gonna give these things a go.
Jon
@Peter Rowell Yeah I agree with you on the "All Singing, All Dancing" version, no point re-inventing the wheel as it'll take you twice as long and will only end up being an arc. +1 for the quotage in all your posts :P
Jay
A: 

The best way I know is to use a library like jQuery. From what I understand iPhone supports jQuery.

Joe Mills
iPhone does indeed support jQuery
jnunn
Could be worth mentioning which methods you could use in jQuery and the general concept behind it :) jQuery is supported on iPhone definitely.
Jay