Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/apps/contacts/js/jquery.inview.js b/apps/contacts/js/jquery.inview.js
- index a38ab16..e71a037 100644
- --- a/apps/contacts/js/jquery.inview.js
- +++ b/apps/contacts/js/jquery.inview.js
- @@ -5,7 +5,7 @@
- */
- (function ($) {
- var inviewObjects = {}, viewportSize, viewportOffset,
- - d = document, w = window, documentElement = d.documentElement, expando = $.expando;
- + d = document, w = window, documentElement = d.documentElement, expando = $.expando, lastScrollTime;
- $.event.special.inview = {
- add: function(data) {
- @@ -46,6 +46,7 @@
- }
- function checkInView() {
- + if (lastScrollTime && ((lastScrollTime - Date()) < 3000)) return;
- var $elements = $(), elementsLength, i = 0;
- $.each(inviewObjects, function(i, inviewObject) {
- @@ -102,6 +103,7 @@
- }
- }
- }
- + function setTime(){lastScrollTime = Date()}
- $(w).bind("scroll resize", function() {
- viewportSize = viewportOffset = null;
- @@ -114,5 +116,6 @@
- //
- // By the way, iOS (iPad, iPhone, ...) seems to not execute, or at least delays
- // intervals while the user scrolls. Therefore the inview event might fire a bit late there
- + $(window).scroll(setTime);
- setInterval(checkInView, 250);
- })(jQuery);
- \ No newline at end of file
Add Comment
Please, Sign In to add comment