Skip to content

Instantly share code, notes, and snippets.

@paulgosnell
Created October 11, 2011 09:36
Show Gist options
  • Save paulgosnell/1277691 to your computer and use it in GitHub Desktop.
Save paulgosnell/1277691 to your computer and use it in GitHub Desktop.
Load Facebook asynchronously
// load facebook
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'http://connect.facebook.net/en_US/all.js#xfbml=1';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment