From 4ec4d42e2ce673745a646b17e483e1297b3a1a94 Mon Sep 17 00:00:00 2001 From: David Boskovic Date: Mon, 24 Sep 2012 00:14:26 -0600 Subject: [PATCH] I've made a modification which allows for the waypoint to be hit accurately on the way back up. For some reason it's 1px off on the return trip. --- waypoints.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waypoints.js b/waypoints.js index 61734a36..ed21f708 100644 --- a/waypoints.js +++ b/waypoints.js @@ -130,7 +130,8 @@ Support: pointsHit = $.grep(this.waypoints, function(el, i) { return isDown ? (el.offset > that.oldScroll && el.offset <= newScroll) : - (el.offset <= that.oldScroll && el.offset > newScroll); + // @author dboskovic (the +1 allows the waypoint to be hit accurately on the way back up) + (el.offset+1 <= that.oldScroll && el.offset+1 > newScroll); }), len = pointsHit.length;