Skip to content

Instantly share code, notes, and snippets.

@HarmlessEvil
Created October 22, 2017 16:06
Show Gist options
  • Save HarmlessEvil/3b91f3f33976da2b664e2917f0794f99 to your computer and use it in GitHub Desktop.
Save HarmlessEvil/3b91f3f33976da2b664e2917f0794f99 to your computer and use it in GitHub Desktop.
Animation on waypoint
function attach_animation(selector, animation) {
$(selector).waypoint(function() {
var element = $(this.element);
element.css('visibility', 'visible');
element.addClass(animation + ' animated');
}, {offset: "80%"});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment