Private
Public Access
1
0

Added cookie law banner

This commit is contained in:
Sander Roosendaal
2016-12-21 13:14:08 +01:00
parent ddc6a32606
commit a03848e568
5 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#CookielawBanner {
background: #fff;
padding: 15px 0;
}
#CookielawBanner .container {
position: relative;
}
#CookielawBanner #CookielawCross {
background: url('../img/close.png') no-repeat 0 0;
cursor: pointer;
display: block;
position: absolute;
top: 0;
right: 0;
width: 15px;
height: 15px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

View File

@@ -0,0 +1,25 @@
var Cookielaw = {
createCookie: function (name, value, days) {
var date = new Date(),
expires = '';
if (days) {
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
} else {
expires = "";
}
document.cookie = name + "=" + value + expires + "; path=/";
},
createCookielawCookie: function () {
this.createCookie('cookielaw_accepted', '1', 10 * 365);
if (typeof (window.jQuery) === 'function') {
jQuery('#CookielawBanner').slideUp();
} else {
document.getElementById('CookielawBanner').style.display = 'none';
}
}
};