Hi, I've knocked together a script to mitigate the effects of Facebook's ridiculously bloated like button on page loading times (also loads a twitter button).
The code works, except the Facebook button doesn't appear - but the twitter button does, and it comes after the FB button in the included code. - I'm no JS expert and was wondering if anyone can spot anything.
Here is my JS:
<script type="text/javascript">
// functions when window has loaded
$(window).load(function(){
// define HTML
var socialHtml='<div id="social-footer"><div class="fb"><sc'+'ript src="http://connect.facebook.net/en_US/all.js#xfbml=1"></sc'+'ript><fb:like layout="button_count" action="recommend"></fb:like></div> <div class="twitter"> <a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><sc'+'ript type="text/javascript" src="http://platform.twitter.com/widgets.js"></scr'+'ipt> </div></div>';
// put HTML in the placeholder container
$('#socialPlaceholder').html(socialHtml);
});
</script>