homepage Welcome to WebmasterWorld Guest from 54.161.191.154
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
whatson

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4484426 posted 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?

 

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4484426 posted 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.

lucy24

WebmasterWorld Senior Member lucy24 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4484426 posted 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?

phranque

WebmasterWorld Administrator phranque us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



 
Msg#: 4484426 posted 10:04 am on Aug 14, 2012 (gmt 0)

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

swa66

WebmasterWorld Senior Member swa66 us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4484426 posted 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)

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

whatson

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4484426 posted 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?

rainborick

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4484426 posted 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