Skip to content

Instantly share code, notes, and snippets.

@paulgosnell
Created October 8, 2011 09:02
Show Gist options
  • Save paulgosnell/1272051 to your computer and use it in GitHub Desktop.
Save paulgosnell/1272051 to your computer and use it in GitHub Desktop.
Load Twitter JS-API asynchronously
// load twitter
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'http://platform.twitter.com/widgets.js';
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