Created
November 18, 2016 09:35
-
-
Save hellomoto177/23d8ed3f11883e769a085317563fefc6 to your computer and use it in GitHub Desktop.
animateCss and waypoints
This file contains 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
(function($) { | |
$.fn.animated = function(inEffect) { | |
$(this).each(function() { | |
var ths = $(this); | |
ths.css("opacity", "0").addClass("animated").waypoint(function(dir) { | |
if (dir === "down") { | |
ths.addClass(inEffect).css("opacity", "1"); | |
}; | |
}, { | |
offset: "90%" | |
}); | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment