Question

Hi have a horizontal div with thumbnail images from my a slide show.
When the active image changes if fires spinAreaDiv.scrollTo(bullet.getPosition().x);. This is working ok.

What is the right syntax to have have a Fx.Scroll working on this?

new Fx.Scroll(spinAreaDiv, {duration: 500}).toElement(bullet.getPosition().x);

gives me "Cannot call method 'getPosition' of null".

What am I doing wrong? thanks

(using mootools 1.3.2)

Was it helpful?

Solution

This should work:

scrollEff = new Fx.Scroll(spinAreaDiv, {wait: false,duration: 1000,
                                    offset: {'x': -3, 'y': 0},
                                    transition: Fx.Transitions.Quad.easeInOut
                    });
scrollEff.toElement(bullet);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top