--
You received this message because you are subscribed to the Google Groups "Disqus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to disqus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
var disqus_shortname = 'myexample';var disqus_identifier = 1;var disqus_url = 1;var disqus_config = function () { this.language = "en";};var disqusElem = document.createElement("div");disqusElem.setAttribute("id", "disqus_thread");disqusElem.setAttribute("class", "disqus_thread");$('body').append(disqusElem);
/* * * DON'T EDIT BELOW THIS LINE * * */(function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);})();$(disqusElem).hide();
/* * * Disqus Reset Function * * */var reset = function (obj, e, newIdentifier, newUrl, newTitle) { e.preventDefault(); var placeholder = $('.thread-wrapper-' + newIdentifier); if (!placeholder.exists()) { var disqusPlace = document.createElement("div"); disqusPlace.setAttribute("class", "thread-wrapper-" + newIdentifier); $(obj).append(disqusPlace); } else { if ($('.thread-wrapper-' + newIdentifier).html() !== '') { $('.thread-wrapper-' + newIdentifier).empty(); } else {
} } if ($('.thread-wrapper-' + newIdentifier).html() !== '') { $('.thread-wrapper-' + newIdentifier).empty(); } else { $('.thread-wrapper-1, .thread-wrapper-2, .thread-wrapper-3').each(function () { $(this).empty(); }); $('.thread-wrapper-' + newIdentifier).attr('id', 'disqus_thread'); var dObj = $('.disqus_thread').attr("id", "");
if ($('.thread-wrapper-' + newIdentifier).html() !== '') { console.log('not empty'); } DISQUS.reset({ reload: true, config: function () { this.page.identifier = newIdentifier; this.page.url = newUrl; this.page.title = newTitle; } }); $('.thread-wrapper-' + newIdentifier).attr('id', ''); $('.disqus_thread').attr("id", "disqus_thread"); }};jQuery.fn.exists = function () { return this.length > 0; }<a href="#" onclick="reset('.thumbnail:eq(1)', event, 2, 2, 2)" class="btn btn-warning" role="button">Comments</a>
--
You received this message because you are subscribed to the Google Groups "Disqus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to disqus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to disqus-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
BYK
Is there a simpler solution?
I think i could tweak it some more and get that result actually. Maybe could just move the disqus thread through each one as it loads, continue cycling the thread to update and assign the active thread to the one the user is on to allow push/ login etc.
Is there a simpler solution?
--
You received this message because you are subscribed to the Google Groups "Disqus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to disqus-dev+...@googlegroups.com.