appendGPlusLink(url)
url. URL of the current page. The parameter is set by default.
The appendGPlusLink method places a link to plusone.js in a page.
To execute the example, the page must contain the DiscussMenu component named shareMenu (see Example of Creating the DiscussMenu Component). In the BODY tag add a DIV element with the identifier Div1. Add the Google+1 button to DOM node with the ID Div1:
shareMenu.appendGPlusLink();//place a link to the plusone.js shareMenu.appendPluseoneContent(document.getElementById("Div1"));//place a button in the specified DOM node var but3 = new PP.Ui.Button(//Button to change parameters of the Google+1 button { Content: "Change the button", ParentNode: document.getElementById("btn3"), Click: function () { shareMenu.goPlusone( { container: document.getElementById("Div1"), pluseone: { size: "medium", annotation: "inline", width: "300" } }) } });
After executing the example the Google+1 and the Change Button buttons are placed in the page. The Google+1 button with initial settings:
Clicking the Change Button resizes the button and changes label appearance:
NOTE. Available button parameters are described on developers.google.com.
See also: