CodeHunger / Jarallax

Parallax scrolling library javascript
GNU General Public License v2.0
165 stars 20 forks source link

Implement css in addAnimation method #28

Open CodeHunger opened 12 years ago

CodeHunger commented 12 years ago
jarallax.addAnimation('.myClass',[{progress:'0%', style:'.style1'}, 
                                  {progress:'100%', style:'.style2'}])

This creates a Jarallax animation. Instead of setting styles in Javascript this new implementation makes it possible to link directly to CSS.

jarallax.addAnimation('.myClass',['.style1', '.style2'])

Setting the progress is optional. If no progress is set then Jarallax sets the first style to 0% and the last style to 100%

xbytes commented 11 years ago

Hello! does this work with version jarallax-0.2.3b.min.js?