Skip to content

Instantly share code, notes, and snippets.

@yuriitaran
Forked from agragregra/animate-css.js
Created February 4, 2018 11:41
Show Gist options
  • Save yuriitaran/43f02b4113e47a76d3b1ddcf0d47d5db to your computer and use it in GitHub Desktop.
Save yuriitaran/43f02b4113e47a76d3b1ddcf0d47d5db to your computer and use it in GitHub Desktop.
Animate CSS jQuery once animate
//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