I created a cookie timer, and I am so new with cookie, plus i am not a pro with jquery so i created the below function.
1st it clears a particular box on click, but doesn't show up when i alter the cookie time, i don't know where the issue would certainly be from.
below is my code
jQuery(document).ready(function ($) {
$('#close-even-more').click(function () {
$('.even-more-sq-rt').hide();
function display() {
var now = new Date();
var time = now.getTime();
var expireTime = time + 1000*30;
now.setTime(expireTime);
var tempExp = 'fri, 08 Dec 2017 05:03:17 GMT';
document.cookie = 'cookie=ok;expires='+now.toGMTString()+';path=/';
console.log(document.cookie);
}
});
});