Hello all!! I'm trying to create a carousel script and am stumbling.

Basically I have a div with overflow:hidden and a ul inside with my sized slides.

When you click next or previous I do

$$('.slide').each ( function(e) {
           new Effect.Move(e, { x:-250 } );
      });

This is paraphrased a bit because I'm using my iPhone. However this works fantastic but where I'm stck is putting the first slide at the end so it comes back around in a circle!! I've tried pushing the first item to the last, ie

$$('.slide').push( $$('.slide').shift() );

And then settin the first slides left; position to the en of the line like;

$$(.slide).first().setStyle( { left: num_slides*slide_width+'px' } );

That works good the first slide movement but after the first movement it is flawed and has a gap equal to a slides width and everything is out of order after that.

Anyone feel like helping me learn this simple trick??

Sent from my iPhone

On Mar 24, 2010, at 7:08 AM, "T.J. Crowder" <t...@crowdersoftware.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to