I'm using isotope on my tumblr theme, but my post (which is an isotope-item) - on a permalink page - will not increase its height after loading more notes. These notes are dynamically inserted after one clicks a link. I've found a possible solution to this by calling .isotope('reLayout');
but it seems I can't get it to work. It will load the new notes, but they get cut off by their container which doesn't increase height at all.
I tried doing it with a click event on the 'show more notes' link, but that link already has inline javascript being executed on click. How can I have the isotope item increase its height (by executing .isotope('reLayout');
) on the click of the 'show more notes' link?
Here's the default tumblr code:
<li class="note more_notes_link_container" style="text-align:center;" id="more_notes_59995759535">
<a class="more_notes_link" rel="nofollow" href="#" onclick="this.style.display='none';document.getElementById('notes_loading_59995759535').style.display = 'block';if(window.ActiveXObject)var tumblrReq=new ActiveXObject('Microsoft.XMLHTTP');else if(window.XMLHttpRequest)var tumblrReq=new XMLHttpRequest();else return false;tumblrReq.onreadystatechange=function(){if(tumblrReq.readyState==4){var notes_html=tumblrReq.responseText.split('<!-- START '+'NOTES -->')[1].split('<!-- END '+'NOTES -->')[0];
if(window.tumblrNotesLoaded)if(tumblrNotesLoaded(notes_html)==false)return;var more_notes_link=document.getElementById('more_notes_59995759535');var notes=more_notes_link.parentNode;notes.removeChild(more_notes_link);notes.innerHTML+=notes_html;if(window.tumblrNotesInserted)tumblrNotesInserted(notes_html);}};tumblrReq.open('GET','/notes/59995759535/YbpaUsPSt?from_c=1378154277',true);tumblrReq.send();return false;">Show more notes</a><span class="notes_loading" id="notes_loading_59995759535" style="display:none;">Loading...</span>
</li>