If what you are trying to do displays the button explicitly when the user points something at something you need to do, use the explicit render stream, as described here:
https://developers.google.com/+/plugins/+1button/
, , div. , , JavaScript .
:
<html>
<head>
<title>+Share: Explicit render</title>
<link rel="canonical" href="http://www.example.com" />
<script type="text/javascript">
window.___gcfg = {
lang: 'en-US',
parsetags: 'explicit'
};
function renderShare() {
gapi.plus.go();
}
</script>
</head>
<body>
<a href="#" onClick="renderShare();">Render the share control</a>
<div class="g-plus" data-action="share" id="share-div"></div>
</body>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(po, s);
})();
</script>
</html>
, +1, , , , .