Infinite Scroll works, Masonry wont.
-
Hello Support Desk.
I’m developing a new website. This is a website where i use serveral post on the homepage(and other pages for example category pages). Because i use many post on the homepage i’m using isotope(masonry) to fit my post in a nice way.
Now because i want to maintain performance i’ve chosen to add a infinite scroll function into it. Then i ran in to your plugin. I installed and configured the plugin on my webpage. Seems easy, so far, so good.
Now when i scroll down my page does load new item(from the next page). Wich it should do. But now is where i get stuck.
The items from page 2 that are being added by the infinite scroll plugin are getting no masonry settings. I’ve tried running masonry through the console after the items where added, but it simply doesnt provide any styling or classes that are related to isotope/masonry.
Situation(Before any items are added):
<ul id="blog" class="isotope" style="position: relative; overflow: hidden; height: 769px; opacity: 1;"> <li class="item7490 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> <li class="item7491 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> <li class="item7492 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> </ul>
Situation(After i scrolled and items been added):
<ul id="blog" class="isotope" style="position: relative; overflow: hidden; height: 769px; opacity: 1;"> <li class="item7490 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> <li class="item7491 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> <li class="item7492 isotope-item" style="position: absolute; left: 0px; top: 0px; -webkit-transform: translate3d(0px, 0px, 0px);">Post stuff</li> <li class="item7508">Post stuff</li> <li class="item7508">Post stuff</li> <li class="item7508">Post stuff</li> </ul>
Anyone has any ideas how to fix this? Seems to me the plugin is not adding Masonry after the items been added.
- The topic ‘Infinite Scroll works, Masonry wont.’ is closed to new replies.