Waypoint refreshAll not works
The waypoint trigger point was not refresh when using refreshAll, but when the browser resizes the trigger point was calculated correctly. Please help
$('#waypoint-trigger').waypoint({
handler: function(direction) {
if (direction === 'down') {
// Code Here
} else if (direction === 'up') {
// Code Here
}
}
});
$('.waypoint-refresh').on('click', function() {
Waypoint.refreshAll();
});
Thanks
Do you have a minimal example with your html? You could use codepen or jsbin to provide us with your code :-)
Whenever toggle is active the hidden element activated before the trigger point is reached, but whenever the window is resized it works perfectly.
http://codepen.io/kumarm80/pen/KpeJQb
Thanks
After youn slide out the menu, you have to refresh your waypoints because their triggerpoint was moved as well. You can do this by adding Waypoint.refreshall to your slideToggle-function.
Look here: http://codepen.io/stehefan/pen/mJKvZX And here for an explanation of the addition: slidetoggle with oncomplete & refreshAll
Thanks @stehefan