
Google +1是Google新推出的服務。先不說成功與否,看起來反應也不錯。這plugin可以幫你把Google +1的+1按鈕,加到你網頁的4個角落,并會隨著用戶scroll的時候,一起移到可視的角落,以方便用戶按下。如果你有其他特定的地方,你也可以指定,代替不同的個角。跟facebook like button一樣,你可以選擇顯不顯示點擊數。你也可以使用不同的大小。
這plugin 支持4個角度(1-4),如你希望使用隨意位置,請使用0。
這plugin 支持4個大小(基於Google +1 api的功能)。
這是包含Google +1 api + CSS + jquery的方案。這Plugin 可以支持IE8+,和其他新版瀏覽器。
Download: jquery.MyGooglePlusOneButton.js
Demo: MyGooglePlusOneButton
License: MIT License
jQuery Code:
//FOUR PAGE CORNERS
//TOP LEFT
$(document).MyGooglePlusOneButton({cornerNo:1, size: "small"});
//OR TOP RIGHT
$(document).MyGooglePlusOneButton({cornerNo:2});
//OR BOTTOM LEFT
$(document).MyGooglePlusOneButton({cornerNo:3});
//OR BOTTOM RIGHT
$(document).MyGooglePlusOneButton({cornerNo:4});
//Specifing your css for the corner
//Mainly for the changing the spacing
$(document).MyGooglePlusOneButton({
cornerNo:1,
topLeftCss:"position:fixed;top:10px;left:10px;z-index:99999"
});
//Put the button at any jquery element
//html colde:
$("#gPlus").MyGooglePlusOneButton({cornerNo:0});
//Without counter
$("#gPlus").MyGooglePlusOneButton({ cornerNo:0, bCount:false });