homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Rotating images

 10:31 pm on Aug 13, 2012 (gmt 0)

These days people tend to avoid flash, so what is the best alternative method for having e.g. a banner with some rotating images?



 2:06 am on Aug 14, 2012 (gmt 0)

one option is an animated gif.

using javascript you could cycle through an array of similar-sized images, replacing the src attribute value of an image element at regular intervals sufficient to simulate animation or rotate at a readable speed as required.
you might also want to preload those images into browser cache so that the first cycle of animation isn't slowed by the individual image downloads.


 8:51 am on Aug 14, 2012 (gmt 0)

OK, I give up. Do you mean "rotating" as in revolving (turning or visibly moving), or do you mean "rotating" as in cycling through a rota of images at intervals of 10 seconds or a minute?


 10:04 am on Aug 14, 2012 (gmt 0)

it's essentially the same problem, just the display time of each image changes.


 6:47 pm on Aug 14, 2012 (gmt 0)

Aside of the problems with flash ...

Is it also not a reaction of the visitors that the web designers want to avoid: the more it moves, the faster the visitor looks for the back button ?

You have other options: transitions in css is about the first I come up with, but other options exist as well such as svg animation (yeah, "that" browser won't do svg to start with)

CSS3 transitions: [w3.org...]
SVG animation: [w3.org...]


 9:14 pm on Aug 14, 2012 (gmt 0)

I mean rotating as in cycling through images, perhaps the image also contains some text on top of it, is hyperlinked, and has back and forward buttons to scroll through the images.
This is fairly simple stuff though right?


 4:30 am on Aug 15, 2012 (gmt 0)

The web is full of JavaScript slideshows that will do that. Search on "JavaScript slideshow captions".

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved