Skip to content

Instantly share code, notes, and snippets.

@anbotero
Created August 15, 2012 04:26
Show Gist options
  • Save anbotero/3355879 to your computer and use it in GitHub Desktop.
Save anbotero/3355879 to your computer and use it in GitHub Desktop.
Discus async loading
$(function(){
var links = $('a');
var query = '?';
for(var i = 0; i = 0) {
query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
}
}
$('head').append('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/{text:Disqus Shortname}/get_num_replies.js' + query + '">' + '</script>');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment