Let your page react to scroll changes.
Update dependencies
body
as the element)Updated webpack-dev-server to > 3.1.11 for security patches. Updated webpack / babel setup in the process.
A complete rewrite of ScrollTrigger. Please checkout the new README and/or example for more info on how to get setup!
.innerWidth/innerHeight fix thanks to @Sqrrl . Also implemented custom .each method which is faster than using .forEach.
You can now define in what scope to search for the callback, instead of having to put them all global in the window scope. This is done by setting the global callScope
variable, like so:
trigger.callScope = ..;
Added support for multiple attributes in the callback definition, e.g. someMethod('foo', 'bar')
works.
Added the trigger.scrollDidChange() method to force check if elements are in or out the viewport.
The new method was causing more trouble than it was solving.