tomiboy
tomiboy

Reputation: 21

How upgrade google + button?

I am beginner web programmer - please help me.

I have this code:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
            <g:plusone size="tall"></g:plusone>

I should upgrade him to asynchronous snippet: http://googlewebmastercentral.blogspot.com/2011/07/1-button-now-faster.html

My problem I don't which image size to choose in google config tool that will be same size as
<g:plusone size="tall"></g:plusone> that I already have in the website.

Thanks in advance

Upvotes: 2

Views: 324

Answers (2)

Vaibhav Garg
Vaibhav Garg

Reputation: 3716

Choose "Tall"

<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="tall"></g:plusone>

<!-- Place this tag after the last plusone tag -->
<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>

For Advacned information see +1 tag parameters section here: http://code.google.com/apis/+1button/

Upvotes: 2

Semyazas
Semyazas

Reputation: 2101

I'm not sure you're getting the correct idea. You're not changing the button, but instead the way the script behaves. Just keep your <g:plusone size="tall"></g:plusone> and change the script accordingly

Upvotes: 2

Related Questions