treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Can I use Speed instead of Duration in animation?

  • I am new to jQuery and am making a 'walking' animation. The idea is that the feet will walk as the user scrolls. I'd like the pace of the walking (speed of animation) to be dependent on the speed of the scroll. Right now the duration is steady and not related to the scrolling speed. It also keeps going after scrolling has stopped.

    My code so far....
    http://jsfiddle.net/sassinack/7H3v7/6/

    Clues... examples, anything would be appreciated!
    Thanks :)