facebook社交插件加载完成后如何加载函数方法?

编程入门 行业动态 更新时间:2024-10-04 05:25:16
本文介绍了facebook社交插件加载完成后如何加载函数方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我用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社交插件加载完成后如何加载函数方法?

本文发布于:2023-11-26 23:18:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1635614.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   社交   函数   插件   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!