Created
January 7, 2011 19:55
-
-
Save DavidQL/770006 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
// Build and inject Like button | |
$('ul.posts a').each(function() { | |
var fb_url = location.href.split('/')[0] + '//' + location.href.split('/')[2] + $(this).attr('href'), | |
fb_like = '<div class="fb_recommend"><fb:like href="'+fb_url+'" layout="standard" show_faces="false" action="recommend" colorscheme="light"></fb:like></div>'; | |
$(this).parent().next().after(fb_like); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment