I want to switch the class of another element when waypoint('sticky') changes the class of the navigation bar. I tried to launch the callback using the handler parameter, but it does not work. What can I do?
waypoint('sticky')
handler
The callback option for waypoints is for some reason a βhandlerβ, so you can do it this way:
$.waypoint('sticky', { handler: function(dir) { //Do stuff when the user scrolls past this waypoint. } });