Skip to content

Instantly share code, notes, and snippets.

@trof808
Created November 28, 2016 12:05
Show Gist options
  • Save trof808/dc6441cb0334c7a407fa8b029ce06428 to your computer and use it in GitHub Desktop.
Save trof808/dc6441cb0334c7a407fa8b029ce06428 to your computer and use it in GitHub Desktop.
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).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