Skip to content

Instantly share code, notes, and snippets.

@kirbysayshi
Created January 27, 2010 00:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kirbysayshi/287426 to your computer and use it in GitHub Desktop.
Save kirbysayshi/287426 to your computer and use it in GitHub Desktop.
jQuery(function(){
var ds_loaded = false, top = jQuery("h1:contains(Comments)").offset().top;
function check(){
if ( !ds_loaded && jQuery(window).scrollTop() + jQuery(window).height() > top ) {
jQuery.getScript("http://jquery.disqus.com/disqus.js?v=2.0&slug=add&pname=wordpress&pver=2.12");
ds_loaded = true;
}
}
jQuery(window).scroll(check);
check();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment