每次Ajax调用后,不同的Facebook评论框 [英] Different Facebook comment box after each ajax call

查看:118
本文介绍了每次Ajax调用后,不同的Facebook评论框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是这样的: 我有一个每个用户点击该按钮时,改变网页。标题被更新,的曲线图。看到在页面现在有不同的内容,我很想有一个不同的注释部分。然而,网址是完全一样的(因为所有的内容都AJAX加载),所以我想知道是否有可能有一个新的FB评论框生成以及(它需要被生成,因为有数百个套内容,用户可以通过点击)?

my problem is this: I've got a webpage that changes each time the user clicks the button. The title is updated, a graph. Seeing as the page now has different content, I would love to have a different commenting section. However, the url is exactly the same (because all of the content is ajax loaded) and so I'm wondering whether it is possible to have a new FB comment box be generated as well (it would need to be generated because there are hundreds of sets of content that the user can click through)?

感谢。

推荐答案

是的,它可以生成一个新的注释框。

Yes it is possible to generate a new comment box.

在AJAX调用,您将需要从DOM删除旧的评论框,然后插入一个新的进入DOM,然后调用javascript函数 FB.XFBML.parse(); 来获取Facebook的重新呈现它。

After the AJAX call, you will need to remove the old comments box from the DOM, then insert a new one into the DOM and then call the javascript function FB.XFBML.parse(); to get Facebook to rerender it.

这篇关于每次Ajax调用后,不同的Facebook评论框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆