Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.53k stars 3.49k forks source link

Animations with timers, is it possible? #325

Closed valapy closed 11 years ago

valapy commented 11 years ago

Hello everyone,

I don't know if this is an "issue" but im trying to do some animations while certain elements reach some px after scroll, for example im doing:

<a data-0="left:0; top:0; opacity: 0;" data-300="left:120px top: 120px; opacity: 1;">example1</a>
<a data-0="left:0; top:0; opacity: 0;" data-300="left:120px top: 120px; opacity: 1;">example2</a>

What im trying to achieve is, after the example1 appears, i want a lapse before example 2 appears...like 100 or 200ms to be more specific.

like this website https://visualwebsiteoptimizer.com/what-is-ab-testing/ which is an example of using skrollr, but i can't find the way they did it, some animations have a time or something after showing for example the part where says: "Visual website optimizer divides traffic between two version"...

Sorry for the bad english too, and thanks a lot!

devdavi commented 11 years ago

It looks like they are used skrollr for the animation effects and jquery for their autoscroll. I'm not very familiar with autoscroll - but essentially just create the page so it functions and animates as you want it to, and then apply autoscroll / jquery animate to the divs to move after a set time

Here's a quick links to help you get started:

http://api.jquery.com/animate/ https://code.google.com/p/jquery-autoscroll/

Prinzhorn commented 11 years ago

192

89

valapy commented 11 years ago

Thanks for the answers! I will do my best to achieve what i'm trying to do...i still can't do it, but i will!