Following Yoast's direction per his post here I am trying to make my twitter's button load asynchronously in order to decrease page load times. Unfortunately, the following code in my functions.php does not work

<div id="twitterbutton">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="tricksdaddy">Tweet</a>
<script type="text/javascript"> jQuery(document).ready(function($) {
  // Load Tweet Button Script
  var e = document.createElement('script');
  e.type="text/javascript"; e.async = true;
  e.src = 'http://platform.twitter.com/widgets.js';
  document.getElementsByTagName('head')[0].appendChild(e);
}
</script></div>

Any hints will be greatly appreciated

link|improve this question
Finally made it. It was just grammar errors, correct code is <script type="text/javascript"> jQuery(document).ready(function($) { // Load Tweet Button Script var e = document.createElement('script'); e.type="text/javascript"; e.async = true; e.src = 'http://platform.twitter.com/widgets.js'; document.getElementsByTagName('head')[0].appendChild(e); }); </script></div> – Jose Jun 28 '11 at 21:49
1  
Hello Jose and welcome to WPSE. If you have solved your problem then please post it as an answer and accept it. If you feel that the answer wont help others then you can delete your question. Thanks – Brady Mar 6 at 21:59
feedback

closed as off topic by Rarst Mar 7 at 12:20

Questions on WordPress - Stack Exchange are expected to generally relate to WordPress, within the scope defined in the faq.

Browse other questions tagged or ask your own question.