Search
Tweet Tweet
Stuff I like

See Me Play


get music on iTunes
Quantcast

Entries in javascript (2)

Friday
Apr302010

New Blog-y Blog

I'm trying out a new experiment while unemployed.  Since I'm the squarespace cheerleader, I've decided to have a place for all my little squarespace javascript hacks.  Check out http://javascript.squarespace.com/ for all my little tips and tricks for making squarespace work for you.

The design isn't there yet but I'll be building it up in the next few weeks.

Friday
Apr302010

Adding the "Like" Button to every post

I just figured out how to add the Facebook "Like" button to every post in my blog.  For those of you who use squarespace, this could be pretty useful for you. You must have jquery for this to run.

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {

$('.journal-entry-tag-post-body-line3').each(function(index) {
var url = $('.title a').get(index);

$(this).append('<iframe src="http://www.facebook.com/widgets/like.php?href='+url+'" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe>');
});

});
</script>