I tried to load Disqus with ajax on my page, I will explain. I have one page inside, I have jqrusel, with different images, and each has its own comments.
So, when I clicked on one of these images, I made this code:
$.get("/sets/comentarios",{set_id:set_id},function(data){ $("#componet_comentarios").html(data);
and this URL loading:
var disqus_identifier = 'votar-<?= $id; ?>'; var disqus_url = 'www.mitrendy.com/votar/<?= $id; ?>'; // Remove the old script if it found oldDsq = document.getElementById('MitrendyComentDisqus'); if(oldDsq) { (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).removeChild(oldDsq); } (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.id = "MitrendyComentDisqus-<?= $id; ?>"; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();
but never update comments. Later I saw on the official disqus page:
DISQUS.reset({ reload: true, config: function () { this.page.identifier = "newidentifier"; this.page.url = "http://example.com/#!newthread"; } });
but this is the same when I tried to load comments using ajax, never update it.
Any idea? I'm crazy with that.
Thanks everyone!
source share