Waypoints do not work when scrolling down too fast

on my website: http://www.entendu.info/ I use the waypoints plugin from http://imakewebthings.com/jquery-waypoints/

If the user scrolls straight down, most waypoints do not start, but only the second and last, as if the middle ones scroll too fast to execute. (waypoints are social buttons that load when scrolling)

Any help? PS: head.ready is just an alternative to document.ready when using headjs to load external scripts.

head.ready(function() {

opts = {

        offset: '85%',
        continuous: 'true',

    };


 //$('.share-this').on('click', function(e){


$('.share-this').waypoint(function(event, direction) {
   if (direction === 'down') {


    var contentId = $('.share-this').attr('rel');
    var uri = $('.share-this').attr('rev');



    $.ajax({
   url: 'http://www.entendu.info/share',
   type: 'GET',
   dataType: 'html',
   data: {id:contentId, url:uri},
   complete: function(xhr, textStatus) {

   },
   success: function(data, textStatus, xhr) {

   $('#'+contentId).html(data);

   },
   error: function(xhr, textStatus, errorThrown) {

   }
   });


   }
   else {

      // do this on the way back up through the waypoint
   }
   //});

   $.waypoints('refresh')
   }, opts);



});
+3
source share
1 answer

, , , jQuery. , .

,

, scroll(), jQuery, . , - elses , .

-1

All Articles