Skip to content

tombye/group-animate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery group animate

Pattern to allow use of jQuery's animate method decoupled from element selections.

Approach added for use with scroll-based animation

Added an extra page to demonstrate the approach can also be used for scrolling too.

Animation in JavaScript is just a function running inside a timer changing a value based on how far towards the end time of the animation it is. So if the function checks the time and finds it's 2 minutes into a 4 minute animation it will change the value 50% between the start value and the end one.

Scrolling is the same when you think about it. A function running inside an event that fires when the user scrolls also checks how close to the end value it is. With that in mind, the pattern works with only a few changes to the group animate code.

Github page

All examples are now accessible through a Github page: http://tombye.github.com/group-animate/

About

Pattern to allow use of jQuery's animate method decoupled from element selections

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published