Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function($) {
- $.fn.animated = function(inEffect, outEffect) {
- $(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
- if (dir === "down") {
- $(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1");
- } else {
- $(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1");
- };
- }, {
- offset: "80%"
- }).waypoint(function(dir) {
- if (dir === "down") {
- $(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1");
- } else {
- $(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1");
- };
- }, {
- offset: -$(window).height()
- });
- };
- })(jQuery);
- (function($) {
- $.fn.animated = function(inEffect, outEffect) {
- var jQueryObject = $(this);
- jQueryObject.css("opacity", "0").addClass("animated");
- jQueryObject.waypoint(function(dir) {
- if (dir === "down") {
- jQueryObject.removeClass(outEffect).addClass(inEffect).css("opacity", "1");
- } else {
- jQueryObject.removeClass(inEffect).addClass(outEffect).css("opacity", "1");
- };
- }, {
- offset: "80%"
- });
- jQueryObject.waypoint(function(dir) {
- if (dir === "down") {
- jQueryObject.removeClass(inEffect).addClass(outEffect).css("opacity", "1");
- } else {
- jQueryObject.removeClass(outEffect).addClass(inEffect).css("opacity", "1");
- };
- }, {
- offset: -$(window).height()
- });
- };
- })(jQuery);
Add Comment
Please, Sign In to add comment