Infinite Scroll and Masonry Javascript conflict in Tumblr

Hi there,

I am having a bit of a problem with a tumblr theme I am using at the minute that uses both Infinite Scrolling and Masonry.
I am using the Tumblr theme “Disassemble 3.0”.

As you can see here when you begin to scroll to the bottom of the page and the infinate scroll takes place, my images are becoming completely muddled and overlapped which leads me to thinking that the two scripts are conflicting.

To be honest, I really am a novice when it comes to Javascript and Jquery and am more confident in CSS and HTML so I can’t say I understand a great deal.

The way I have it called up is:

<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>

<script type="text/javascript">
$(function() {
    $(window).scroll(function() {
        if($(this).scrollTop() != 0) {
        } else {
	$('#toTop').click(function() {

<script type="text/javascript" src=""></script>

Any help would be much appreciated!

Hi there,
You’re pulling in jQuery twice (the first two lines of the above code).
Try deleting the older version (1.4.2) and see if that makes a difference.

Hello again…

Thanks for your advice.
I just tried that and it still doesn’t work.

So frustrating.

I’ve just been doing a bit of Googling and it seems that what you are experiencing could be a common problem.
It seems that the overlapping happens when the images haven’t been fully loaded and Masonry is already triggered.
According to this post you need to load the images before triggering masonry.

Also, you seem to be using the the Tumblr specific infinite scroll code (
Try using the infinite scroll code from and see if that makes a difference.

Other that that, Googling something like “infinite scroll masonry tumblr” gives you a load of hits that might help you more: