javascript - Tumblr Masonry + Infinite scroll overlaps on loading next set of posts -


i new javascript , programming in general, therefore cannot figure out doing wrong here. want fit photoset post container perfectly, changed {photoset-500} {photoset} automatically measures size , fits in. that, however, when scroll these specific photoset containers overlap. every other img fine.

it doesn't happen in first loaded posts, when scroll. website: http://tototo232.tumblr.com/ (password: 123)

my script

<script type="text/javascript">     $(window).load(function() {         var $wall = $('#posts');         $wall.imagesloaded(function() {             $wall.masonry({                 itemselector: '#entry, #entry_photo,',                 isanimated: false             });         });           $wall.infinitescroll({                 navselector: '#page-nav',                 nextselector: '#page-nav a',                 itemselector: '#entry, #entry_photo,',                 bufferpx: 2000,                 debug: false,                 errorcallback: function() {                     $('#infscr-loading').fadeout('normal');                 }             },             function(newelements) {                 var $newelems = $(newelements);                 $newelems.hide();                 $newelems.imagesloaded(function() {                     $wall.masonry('appended', $newelems, true, function() {                         $newelems.fadein(300);                     });                 });             });         $('#content').show(500);     }); </script> 

i understand can happen when masonry triggered before images loaded, tried many ways around it, , still fails.

i appreciate can get.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -