PDA

View Full Version : Infinite (endless) scroll - masonry issue



chechu
01-31-2014, 02:05 PM
Hey all,
I'm trying to integrate infinite (endless) scroll on my page, using this example: http://www.jquery4u.com/tutorials/jquery-infinite-scrolling-demos/ (demo 1).
But the page I'm working on (http://lichaamengeest.be/test.htm) does not show the masonry in the called pages. There must be a conflict between the masonry js files and isotope, as it all gets messed up. Please advise on how to get everything in masonry. Thanks!

Added: if you look at the called pages test2, test3,...,test6 seperately, then you'll see that they all show up in masonry. But with the infinite scroll, they don't.

Seems like there is a conflict in between the js files:
- https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
- http://lichaamengeest.be/js/jquery.isotope.min.js
- http://lichaamengeest.be/js/jquery.infinitescroll.min.js
Can anyone see what's conflicting, please? Thanks.

chechu
02-18-2014, 03:05 PM
Anyone, please?

chechu
03-04-2014, 09:58 AM
Hey all,

Maybe a better explanation is needed.

I use a template that doesn't provide support anymore (http://support.brankic1979.com/old-site-templates-support), where the masonry style is used in its portfolio (http://demo.brankic.net/bigbang/streched/portfolio-column-4.html).

What I'm trying to do is to have a part of the page tiled up masonry style, then have a bit of normal text, and then add another piece of masonry. Problem is that the second part of masonry doesn't tile up as it should, as you can see here (http://lichaamengeest.be/AA.php). So there must be a conflict in the javascript that prevents itself from repeating the tiling up, I guess.

Could you please have a look at the coding of the page, and let me know how that could be resolved? At the end, I'd like to create infinite scrolling, like here (http://lichaamengeest.be/test.htm) (where the same issue is stopping the masonry continuation).

Any help would be highly appreciated!
Thanks.

chechu
03-27-2014, 10:58 AM
Anyone having experience with infinite scroll combined with masonry, please?

Boneff
03-28-2014, 04:10 PM
Well, as far as I can see - the way your HTML is structured it cannot work as you expect it.
As you can see in each "BOX" div the LI elements are successfully structured with masonry.

It's a bit tricky to explain now, but I think you should remove the "BOX" divs and leave only the UL and append more and more LI elements inside of the UL.
But do not create new UL each time - and that way the LI elements will be aligned with masonry.

If that doesn't work I will check the thread in a few days again.
I don't have much time now, wish you luck.

chechu
03-29-2014, 09:06 AM
Hey Boneff,
Thanks a lot for your suggestions!
I made three adjustments:

1/ original code:

<div id="container">
<div class="box">
<ul id="thumbs">
<li class="col4 item">
</li>
</ul>
</div>
</div>
<nav id="page-nav">
<a href="#.htm"></a>
</nav>


changed into:



<ul id="thumbs">
<div id="container">
<li class="col4 item">
</li>
</div>
</ul>
<nav id="page-nav">
<a href="#.htm"></a>
</nav>


2/ I also removed all other coding from the second page, leaving just the <li>.

3/ And in the script, I changed ".box" into ".item" (on the page and in the infinitescroll.min.js), as the <li> are classed as "item".

This the result, where you can see that the masonry is coming up pefectly, but the page itself doesn't scroll anymore: http://lichaamengeest.be/Atest.htm
Almost there! Please advise on further steps. Thanks.