johnpolacek / scrollorama

The jQuery plugin for doing cool scrolly stuff. NOTE: No longer under active development. New version is ScrollMagic.js
http://johnpolacek.github.com/scrollorama/
2.51k stars 371 forks source link

Ability to animate using units other than pixels (e.g %, pt, em, etc) #32

Closed jhdavids8 closed 11 years ago

jhdavids8 commented 11 years ago

I ran into an issue where I wanted the width of an element to animate to a percentage of its container rather than a pixel width (animate to '90%' instead of '90px'), so I added support for any CSS unit by extracting non-numeric characters at the end of the given start and/or end value and using that unit during element animation. Thanks!

johnpolacek commented 11 years ago

Thanks!

jhdavids8 commented 11 years ago

Thank you!