Created
March 29, 2014 06:03
-
-
Save andyvanee/9849384 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>async</title> | |
</head> | |
<body> | |
<div id="async-scripts">Social widgets will go here...</div> | |
<div>Page contents here...</div> | |
<script id="script-sandbox" type="text/html-template"> | |
<div class="my-toolbar"> | |
<a href="https://twitter.com/andyvanee" class="twitter-follow-button" data-show-count="false" data-width="60px" data-align="left">Follow @andyvanee</a> | |
<a href="https://twitter.com/share" class="twitter-share-button" data-via="andyvanee">Tweet</a> | |
--#script#-- !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');--#/script#-- | |
... the rest of your widgets here ... | |
</div> | |
</script> | |
<script> | |
jQuery(function($){ | |
var sandbox = $("#script-sandbox").html().replace(/--#/g, '<').replace(/#--/g, '>'); | |
$("#async-scripts").append($(share_html)); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment