0

我在我的 tumblr 主题上使用同位素,但我的帖子(这是一个同位素项目) - 在永久链接页面上 - 在加载更多笔记后不会增加其高度。单击链接后,这些注释会动态插入。我通过调用找到了一个可能的解决方案,.isotope('reLayout');但似乎我无法让它工作。它会加载新的笔记,但它们会被它们的容器截断,而容器根本不会增加高度。

我尝试使用“显示更多注释”链接上的点击事件来做到这一点,但该链接已经在点击时执行了内联 javascript。.isotope('reLayout');单击“显示更多注释”链接,如何让同位素项目增加其高度(通过执行)?

这是默认的 tumblr 代码:

<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>
4

1 回答 1

0

我有一个小提琴给你..

if ($(this).hasClass('selected'))

JSFIDDLE 演示

希望这可以帮助你

好的,我有一个链接给你.. 只是通过它可能有用的链接

于 2013-09-03T08:33:30.713 回答