MyBB Community Forums

Full Version: Endless scrolling in MyBB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
I can have a look if you'd like.
Now working at http://harajuju.net/Forum-Haralooks if you're on the dev theme. If you're not, copy and paste this URL into your browser:
http://harajuju.net/?action=quickthemeoc&style=19

Big thanks to Eric J for making it work. Here's what the javascript ended up looking like.

<script type="text/javascript">
jQuery(function($) {
$.ias({
  container     : '.looksthreads',
  item        : '.item',
  pagination    : '.pagination',
  next        : 'a.pagination_next',
  loader    : '<img src="/images/spinner.gif">',
thresholdMargin: -570,
triggerPageThreshold: 'false',
  onLoadItems: function(items) {
        // hide new items while they are loading
        var newElems = $(items).show().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 });
          $('.looksthreads').masonry( 'appended', newElems, true );
        });
        return true;
    }
});
});
</script> 
When you scrolled a bit, go to a image and the press the browsers back button, it goes nut's.
Other than that, brilliant! Smile
It's true, this is a bit of an issue. It can be disabled though: https://github.com/webcreate/Infinite-Aj...ll#history
Pages: 1 2 3 4 5 6 7 8