Use Fx event onComplete. Then find out what state the element is in (is it shown or hidden) and depending on this call toRight() or toLeft ().

On Oct 15, 2009, at 9:58 PM, mmjaeger wrote:


Hello
Please allow me a quick question - I got the following code:

<code>
var fxScroll = new Fx.Scroll($('randomImageContainer'), {
                        duration: 10000,
                        wait: false
                }).toRight().chain(function(){
                this.toLeft.delay(2500, this);
                });
</code>

this scrolls to the right and then back to the left - what I don't see
is how I could basically use it to run endless (in a loop)

thank you in advance for your help.

Reply via email to