Masonry不适用于Twitter小部件

Masonry not working for Twitter widget

本文关键字:小部 Twitter 适用于 不适用 Masonry      更新时间:2023-09-26

我有一些Javascript可以从用户那里提取最近的推文。它看起来像这样:

getTwitters('tweet', { id: 'LadyGaga', count: 8, enableLinks: true, ignoreReplies:   
false, clearContents: true, template: '%text% <a class="arrow"   
href="http://twitter.com/%user_screen_name%/statuses/%id_str%/" target="_blank"></a>'  
});

推文作为列表动态加载到中

<div id=tweet"></div>

带有

$(window).load(function () { $('#tweet').masonry(); });

然而,由于某种原因,它不起作用:(我一直这样做,我不知道为什么会这样做。

我的CSS也是安全的:

#tweet {
margin-left:-43px;
}
#tweet li {
list-style:none;
padding:5px;
margin:0 0 3px 3px;
background:url('http://static.tumblr.com/ux4v5bf/wM2lywrxr/aeeatagsd.png') repeat;
float:left;
width:88px;
}

我再次查看了我的代码,并认为我必须针对推特的ul,而不是推特本身。哈哈,我傻了。