Created
December 28, 2017 09:49
-
-
Save carolina-vallejo/d01330f2ddd14d3ade2fc17d60a69b69 to your computer and use it in GitHub Desktop.
#javascript scroll detector waypoints.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.scrolldetector').each(function() { | |
var $this = $(this); | |
var waypoint = new Waypoint({ | |
element: $this.get(), | |
handler: function() { | |
$this.addClass('animate'); | |
}, | |
offset: '70%' | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment