我用jQuery砌筑布局网站上的列表项,每个列表项都有一个fb:comments.异步加载SDK,甚至可以放置方法"$ container.masonry('reload');" FB.init()之后,列表项仍然重叠.
I have jQuery masonry to layout the list items on my website, each list item has a fb:comments. Loading SDK asynchronously, even putting the method "$container.masonry( 'reload' );" after FB.init() the list items are still overlapping.
我测试了在重新装填石工之前放置一个alert()框,如果快速关闭该警告框,则该项目仍会重叠,但是如果过一会儿将其关闭,则该框会正确显示并留有余量.因此,我假设砌体重新加载在fb:comments的内容加载完成之前开始.
I tested putting an alert() box before reload masonry, if close the alert box quickly the items are still overlapping but if close it after a while it display correctly with margin. So I assume the masonry reload runs before the content of fb:comments finish loaded.
在fb:comments内容完成加载后,如何触发砌体重新加载?不能通过单击按钮.图片显示了何时重叠以及fb:comments之后砌筑物重新加载.
How do I trigger masonry reload after the content of fb:comments finish loaded? Not by button click. Images show when it's overlapping and masonry reload after fb:comments.
推荐答案如果您使用xfbml版本的插件,则可以订阅xfbml.render-在所有插件(调用)完成后触发. developers.facebook/docs/reference/javascript/FB.Event.subscribe/
If you use xfbml version of plugins, you can subscribe to xfbml.render - fired when all plugin (calls) completes. developers.facebook/docs/reference/javascript/FB.Event.subscribe/
更多推荐
facebook社交插件加载完成后如何加载函数方法?
发布评论