Hello everyone, there is such a code
(function($) { $.fn.animated = function(inEffect, outEffect) { $(this).css("opacity", "0").addClass("animated").waypoint(function(dir) { console.log(dir) if (dir === "down") { $(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1"); } else { $(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1"); }; }, { offset: "100%" }).waypoint(function(dir) { console.log(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); When loading a page, the console in chrome issues a warning:
It was delayed for 423 ms due to mainstream mouse. Consider marking event handler as 'passive' to make the page more responive.
How do I get rid of the delay?