STYLE SWITCHER

How to make jQuery waypoints plugin fire when an element is in view and not scrolled past?

drupal-and-jquery-logos

$(”div”).waypoint(function(event, direction) {
// do your fade in here
$(this).fadeIn();
}, {
offset: function() {
// The bottom of the element is in view
return $.waypoints(”viewportHeight”) – $(this).outerHeight();
}
});

Website

Recent Article

Leave a Reply

Your email address will not be published. Required fields are marked *