Skip to content

Commit

Permalink
Create animated-1.0.0.min.js
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-stepien committed Mar 9, 2016
1 parent b13157b commit fceddd6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions animated-1.0.0.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Name: Animated
Version: 1.0.0
Description: Script that uses animate.css on scroll
Created on: 2016-02-29
Author: Artur Stępień ([email protected])
Author URI: http://www.bestproject.pl
Copyrights: BestProject
License: GNU GPL 3.0 (See LICENSE file)
Requires: animated.css and jQuery
How to use: See example.html
*/
(function(a){a.fn.Animated=function(){var c=a(window);c.on("scroll",b);function b(){var e=c.height()*1.1;var d=c.scrollTop(),e=c.height()*1.1;a('[class*="animated-"]').each(function(){var g=a(this);var f=g.offset().top;if(d+e>f){g[0].className=g[0].className.replace("animated-","animated ")}});a(".animated").each(function(f){var h=a(this);var g=h.offset().top;if(d+e<g){h[0].className=h[0].className.replace("animated ","animated-")}})}setTimeout(function(){b()},100);return this}}(jQuery));

0 comments on commit fceddd6

Please sign in to comment.