}
this.init();
}
+
FluidbookPrivacy.prototype = {
init: function () {
- if (localStorage.getItem(this.storageKey) == '1') {
+ if (localStorage.getItem(this.storageKey) === '1') {
return;
}
});
},
displayCookieConsent: function () {
+ if($("#cookieConsent").length>0){
+ return;
+ }
var $this = this;
$('body').append('<div id="cookieConsent"><a href="#" class="close"></a><p>' + this.fluidbook.datas.cookieConsentMessage + '</p></div>');
if (this.fluidbook.datas.cookieConsentAutoclose > 0) {
$this.close();
}, this.fluidbook.datas.cookieConsentAutoclose * 1000);
}
- $("#cookieConsent a.close").on('touchend click', function () {
+ $(document).on('touchend click', "#cookieConsent a.close", function () {
$this.close();
return false;
});