Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- var ck = getCookie("showBar");
- console.log("cookie " + ck);
- if (ck === null){
- $('.cookie-notification').show();
- console.log('CB anzeigen');
- $(".js-cookie-notification-hide").click(function() {
- $(".cookie-notification").fadeOut(1000);
- $.cookie('showBar', false);
- });
- }
- else {
- $(".cookie-notification").hide();
- console.log('CB nicht mehr anzeigen');
- }
- console.log("cookie after click " + ck);
- function setCookie(cname, cvalue) {
- document.cookie = cname + "=" + cvalue;
- console.log(document.cookie);
- }
- function getCookie(name) {
- function escape(s) { return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, '\\$1'); };
- var match = document.cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)'));
- return match ? match[1] : null;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement