Problem:
It seems that while masonry JS works perfectly fine with all AJAX pagination methods on a Toolset View, it conflicts with infinite scroll.
The behaviour is that it seems masonry "takes longer" to "kick in" on infinitely scrolled views, while other AJAX paginated views do apply masonry layout immediately to the output
Solution:
Masonry needs to adjust the new content, but when the pagination starts there is no new content to adjust just yet.
Hence, Masonry effects kick in when the AJAX pagination of Views replaces the old with new content before the pagination completes.
Until pagination completes the new masonry layout is not final, hence it can't be completely built.
If you use a Views pagination effect, anything that you do on the new View output should wait until the pagination is done.
This is the same when applying the masonry library to a layout on the first page-load: it needs to wait until the page is loaded. You should never ever apply a library over an HTML tree that is going to change.
To reduce the time until results getting applied to a library, you can always reduce the animation time to 0. New content will get masonry applied as soon as it gets loaded, but ONLY once it is loaded. That can not be avoided.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 20 replies, has 2 voices.
Last updated by 4 years, 10 months ago.
Assisted by: Beda.