Skip to content

Instantly share code, notes, and snippets.

@machu
Created August 19, 2011 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machu/d550f8e0126c92785ea0 to your computer and use it in GitHub Desktop.
Save machu/d550f8e0126c92785ea0 to your computer and use it in GitHub Desktop.
jQuery.socialbuttonで2つ目以降のGoogle+ボタンが表示されない
<html>
<head>
<title>+1 デモ: 明示的な読み込み</title>
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.socialbutton.js" type="text/javascript"></script>
</head>
<body>
<div><button id="button1">http://www.google.com/</button> </div>
<div><button id="button2">http://www.amazon.com/</button> </div>
<div><button id="button3">http://www.twitter.com/</button> </div>
<script type="text/javascript">
$('button').click(function(event) {
var button = $(event.target);
button.parent().socialbutton('google_plusone', { href: button.text() });
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment