Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
897 views
in Q2A Core by

it's duplicating some questions , here is the my code ; if I can do this i will share my theme here free

  $(function(){
 
    var $container = $('#container');
 
    $container.imagesLoaded(function(){
      $container.masonry({
itemSelector : '.box',
isFitWidth: true,
columnWidth: 236,
gutter: 14
      });
 $('#loading').hide();
    });
 
    $container.infinitescroll({
      navSelector  : '.qa-page-links-list',    // selector for the paged navigation
      nextSelector : '.qa-page-links-list .qa-page-next',  // selector for the NEXT link (to page 2)
      itemSelector : '.box'     // selector for all items you'll retrieve
      },
      // trigger Masonry as a callback
      function( newElements ) {
        // hide new items while they are loading
        var $newElems = $( newElements ).css({ opacity: 0 });
        // ensure that images load before adding to masonry layout
        $newElems.imagesLoaded(function(){
          // show elems now they're ready
          $newElems.animate({ opacity: 1 });
          $container.masonry( 'appended', $newElems, true );
        });
      }
    );
  });
by
I can't see any problem in your code that can cause duplicate questions. did this happen without masonry code?

Please log in or register to answer this question.

...