Skip to content

Instantly share code, notes, and snippets.

@simondahla
Created July 10, 2013 14:00
Show Gist options
  • Save simondahla/7375ca8f37a28ac0334a to your computer and use it in GitHub Desktop.
Save simondahla/7375ca8f37a28ac0334a to your computer and use it in GitHub Desktop.
setTimeout(function(){
// tweet button
var tweeter = $('<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>');
// facebook 'like' button
var fbLike = $('<iframe class="fbLike" src="http://www.facebook.com/plugins/like.php?href=bestofconversion.com&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font=arial&amp;action=like&amp;height=35&amp;colorscheme=light&amp;layout=button_count&amp;appId=2398652648"></iframe>');
$('.social').append(fbLike, tweeter);
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
window.getComputedStyle(fbLike[0]).getPropertyValue('top');
$('.social').addClass('show');
},500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment