After adding the list, you need to recalculate the waypoint position.
The API documentation assumes this is done using the refresh
command:
$.waypoints('refresh');
However, updating immediately after the function calls (at least in my tests) many lists that should be added immediately.
I suspect that this is due to the fact that the user interface drawing events are not displayed / reset until the function is completed or until a buffer is exhausted.
Therefore, moving the update from execution order using timeout
like a trick:
setTimeout(function(){$.waypoints('refresh');},10);
See my jsFiddle , which seems to work correctly.
source share