Created
June 5, 2012 15:37
-
-
Save smeevil/2875769 to your computer and use it in GitHub Desktop.
Cookie control translation
This file contains hidden or 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
//Add this after your cookie control script | |
function TranslateCookieControl(){ | |
var cookieControlTitle="Cookie Acceptatie"; | |
var cookieControlOkButton="Ik ga hiermee akkoord !"; | |
var cookieControlMoreInfoButton="Meer info" | |
var cookieControlLessInfoButton="Minder info" | |
$('p.ccc-about').remove(); | |
$('#ccc-go').html(cookieControlOkButton); | |
$('.ccc-inner').children().first().html(cookieControlTitle); | |
$('.ccc-expand').html("Meer info"); | |
function ChangeCookieControlButtonText(){ | |
if ($('.ccc-expand').html()=="read less"){ | |
$('.ccc-expand').html(cookieControlLessInfoButton); | |
}else{ | |
$('.ccc-expand').html( cookieControlMoreInfoButton); | |
} | |
} | |
$('.ccc-expand').bind('click', function(e){ChangeCookieControlButtonText();setTimeout(function(){;ChangeCookieControlButtonText()},300)}) | |
} | |
//Then in your cookie control script change the onReady function from : | |
onReady:function(){}, | |
to : | |
onReady:function(){TranslateCookieControl()}, | |
//Thats it , enjoy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment