I recently upgraded jquery-waypoints from 2.x to 3.x in my project and found that a lot of my code broke. All references to $(this)
within my handlers had to be changed to $(this.element)
which, once I figured out was the cause of my troubles, was easy enough to fix.
I haven't been able to figure out what happened to the triggerOnce
option which would prevent a waypoint from firing multiple times. Any idea why this was removed and how can I achieve the same functionality?
I figured out a solution. Adding this.disable() to the end of my handler disables the waypoint after it's been fired, preventing it from being called again. I really think this should be documented.