Created
July 12, 2013 07:28
-
-
Save tomoyamkung/5982579 to your computer and use it in GitHub Desktop.
[JavaScript]jQuery.socialbutton プラグインを自分のブログに組み込むときに作成したスクリプト。
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
<!-- ボタンを設置したい場所に次を埋め込む --> | |
<ul id="social_buttons"> | |
<li class="tweet"></li> <!-- twitter --> | |
<li class="evernote"></li> <!-- Evernote --> | |
<li class="facebook_like"></li> <!-- Facebook --> | |
<li class="hatena"></li> <!-- はてなブックマーク --> | |
<li > <!-- Pocket --> | |
<a data-pocket-label="pocket" data-pocket-count="horizontal" class="pocket-btn" data-lang="en"></a> | |
<script type="text/javascript">!function(d,i){if(!d.getElementById(i)){var j=d.createElement("script");j.id=i;j.src="https://widgets.getpocket.com/v1/j/btn.js?v=1";var w=d.getElementById(i);d.body.appendChild(j);}}(document,"pocket-btn-js");</script> | |
</li> | |
</ul> | |
<div class="clear_left" /> |
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
/* jQuery.socialbutton プラグインとのインタフェース */ | |
<script> | |
$(function() { | |
$('.evernote').socialbutton('evernote', { | |
button: "http://static.evernote.com/article-clipper-jp.png", | |
styling: 'full' | |
}); | |
$('.hatena').socialbutton('hatena'); | |
$('.tweet').socialbutton('twitter', { | |
button: 'horizontal', | |
}); | |
$('.google_plusone').socialbutton('google_plusone',{ | |
size: 'medium' | |
}); | |
$('.facebook_like').socialbutton('facebook_like', { | |
button: 'button_count', | |
width: '100' | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jQuery と jquery.socialbuttonプラグイン本体のダウンロードは以下から。