1. jarsofthought reblogged this from lexiconofreality
  2. spooky-woody-guthrie reblogged this from lexiconofreality
  3. whatisgrammaranyway reblogged this from lexiconofreality
  4. curi0usoandcuri0user reblogged this from lexiconofreality
  5. butourlipsrefusetomove reblogged this from lexiconofreality
  6. its-karen-muthafuckin-damn reblogged this from lexiconofreality
  7. oddfuturex12512 reblogged this from lexiconofreality
  8. genitale reblogged this from lexiconofreality
  9. rehab-inked reblogged this from lexiconofreality
  10. lexiconofreality posted this
$(window).load(function () { // endless scrolling var $container = $('#holder'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector: '.box' }); }); $container.infinitescroll({ navSelector : '#page-nav', // selector for the paged navigation nextSelector : '#page-nav a', // selector for the NEXT link (to page 2) itemSelector : '.box', // selector for all items you'll retrieve bufferPx: 0, debug : true, loading: { finishedMsg: 'No more pages to load.', img: 'http://i.imgur.com/6RMhx.gif' } } 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 ); }); } ); // End of endless scrolling });