Created
July 18, 2011 21:04
-
-
Save RalfAlbert/1090650 to your computer and use it in GitHub Desktop.
Google+ Button Datenschutzkonform mit iFrame
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready( function(){ | |
$('#gplus').click( function(){ | |
var l = window.location; | |
var url = encodeURIComponent( l.href ); | |
var parent = encodeURIComponent( l.href.replace( l.pathname, '' ) ); | |
var gframe = '<iframe src="https://plusone.google.com/u/0/_/+1/button?' | |
+ 'url=' + url | |
+ '&size=standard' + | |
+ '&count=true' + | |
+ '&hl=de-DE' + | |
+ '&parent=' + parent | |
+ '" name="gFrame" id="gFrame"></iframe>'; | |
$( gframe ).insertAfter( '#gplus' ); | |
$('#gplus').remove(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment