$(function() { $('#cookie-law-message .imClose').on('click', function(event) { $('#cookie-law-message').remove(); let expiry = new Date(); expiry.setTime(expiry.getTime() + 2592000000); document.cookie = "cookieBannerDismiss=true; SameSite=Strict; Secure; expires=" + expiry.toUTCString(); }); });