$(function() { var waypoint = $(".delivered").waypoint(function() { $("html,body").stop().animate({ scrollTop: $("#to-delivered").offset().top }, 600); waypoint[0].enabled = false }, { offset: "70%" }) });