Created
July 3, 2013 07:33
-
-
Save FiNGAHOLiC/5916112 to your computer and use it in GitHub Desktop.
share buttons
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
// embed share button | |
(function(){ | |
// google analytics | |
// see: http://mathiasbynens.be/notes/async-analytics-snippet | |
// window._gaq = [['_setAccount','UA-XXXXXXXX-X'],['_trackPageview']]; | |
// $.getScript('//www.google-analytics.com/ga.js'); | |
// html: <div class="g-plusone" data-size="medium"> | |
// html(callback): <div class="g-plusone" data-size="medium" data-callback="googleSiteCatalyst"></div> | |
$.getScript('//apis.google.com/js/plusone.js', function(){ | |
// window.googleSiteCatalyst = function(){ | |
// console.log('Google Plusone Button Clicked'); | |
// }; | |
}); | |
// html: <div class="fb-like" data-send="false" data-width="120" data-layout="button_count" data-show-faces="false"></div> | |
$.getScript('//connect.facebook.net/ja_JP/all.js', function(){ | |
FB.init({ cookie: true, xfbml: true }); | |
// FB.Event.subscribe('edge.create', function(){ | |
// console.log('Facebook Like Button Clicked'); | |
// }); | |
}); | |
// html: <a href="https://twitter.com/share" class="twitter-share-button" data-lang="ja"></a> | |
$.getScript('//platform.twitter.com/widgets.js', function(){ | |
// window.twttr && window.twttr.ready(function(twttr){ | |
// window.twttr.events.bind('click', function(){ | |
// console.log('Twitter Like Button Clicked'); | |
// }); | |
// }); | |
}); | |
// hatena | |
// html: <a href="http://b.hatena.ne.jp/entry/" class="hatena-bookmark-button" data-hatena-bookmark-layout="simple" title="このエントリーをはてなブックマークに追加"><img src="http://b.st-hatena.com/images/entry-button/button-only.gif" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a> | |
$.getScript('//b.st-hatena.com/js/bookmark_button.js'); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment