#jQuery Hatebu
はてブボタンを生成する jQuery プラグイン。
記事ページでの使用例。
//ボタンタグの生成、挿入
$.hatebu().appendTo('#social-buttons');
//レンダリング
$.hatebu.rendar();
一覧ページでの使用例。
//ボタンタグの生成、挿入
var social = $('.post .social-buttons');
$('.post h2 a').each(function(idx){
var target = $(this);
$.hatebu({
url : target.prop('href'), // url
title : target.text() // title
}).appendTo(hatebu.eq(idx));
});
//レンダリング
$.hatebu.rendar();