johnpolacek/superscrollorama — pull request #16 by zeevl (2012-12-05 22:33:55+00:00)
Title: Callback function for target parameter

Hey John,

Thanks for the super awesome superscrollorama plugin! It's simple yet powerful, the best kind..

I ran into an issue with a scenario I was dealing with, where I wanted the tween to start at a position relative to statically placed elements. However, since the target position could change if, say, the browser resized, neither of the existing options for the target parameter would work.

So I added support for a third type, a callback function. This function is expected to return the numeric offset value used to trigger the tween. Simple change, yet even more powerful. :)

Steve