1

I Need to Load a boxes when scrolling( like pinterest .) I have used jscroll. as below. But loads all the boxes(pages) when page loades. It needed to be load when scrolling. Can anyone help me to fix this. I have used code from

http://jscroll.com/

Thanks in advance

HTML:

<div class="col-md-9 col-lg-9 posts-container">
  <div class="timeline-posts">
    <div class="col-lg-6 col-md-12 col-xs-12 col-sm-12 post-container">
    </div>
  </div>
</div>

JS:

 $('.timeline-posts').jscroll({
    // loadingHtml: '<img src="loading.gif" alt="Loading" /> Loading...',
    nextSelector: 'a.jscroll-next:last',
    debug: true,
    callback : function()
    {

    }
});

CSS:

.posts-container
{
    -moz-column-width: 25em;
    -webkit-column-width: 25em;
    -moz-column-gap: 1em;
    -webkit-column-gap: 1em;
    column-width: 25em;
    column-gap: 1em;
    -webkit-column-count: 2; 
    -moz-column-count:2; 
    column-count: 2;
    height: 100%; 

}

.posts-container .post-container 
{
    display: inline-block;
    width: 100%;
    -webkit-column-break-inside: avoid;
    break-inside: avoid-column; 
} 
user
  • 115
  • 1
  • 12

0 Answers0