$(document).ready(function() { // Only execute if the URL contains the Dutch slug '/nl' // if(window.location.href.indexOf('/nl') > -1) { // Check if the URL does not contain the word 'webinars' if(window.location.href.indexOf('webinars') === -1) { const modal = $('#webinar-modal'); function webModal(){ hasSeenBanner = getCookie("hasSeenWebinarBanner"); if (hasSeenBanner == "") { modal.addClass('active'); } } function closeModal(){ setCookie('hasSeenWebinarBanner', '1', '20'); modal.removeClass('active'); } $('#close-webinar-modal').click(function() { closeModal(); }); setTimeout(() => { webModal(); }, 15000); // Below you find three function for setting a cookie, getting a cookie and eventually checking whether the cookie exists function setCookie(cname, cvalue, exdays) { const d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); let expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; } function getCookie(cname) { let name = cname + "="; let decodedCookie = decodeURIComponent(document.cookie); let ca = decodedCookie.split(';'); for(let i = 0; i
Capterra rating 4.3
© Apostle Social 2024
Privacy Policy
Terms and conditions
GDPR
KVK: 57449104
VAT: NL852584362B01