Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery / Cookie popup issue
    primarykey
    data
    text
    <p>I was recently helped with this issue, but cannot get hold of the person who helped me.</p> <p>The code bellow makes a popup show every 24 hours and creates a cookie that expires every day. The issue I'm having is that when the cookie expires, a new one is created but the popup box does not show. I have this running on a site with a lot of users and all say it popped up once and never again.</p> <p>I'm fine with HTML &amp; CSS but this is 100% out of my range. I think the cookie needs to be deleted not renewed from what I have seen around the internet, but I'm expecting to be wrong.</p> <p>Any help would be greatly appreciated! Many thanks in advance.</p> <pre><code> &lt;link rel="stylesheet" href="colorbox.css" /&gt; &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="./colorbox/jquery.colorbox.js"&gt;&lt;/script&gt; &lt;script&gt; function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i&lt;ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); x=x.replace(/^\s+|\s+$/g,""); if (x==c_name) { return unescape(y); } } } function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; } function checkCookie() { var cookieValue=getCookie("IGTop100Vote"); if (cookieValue==null || cookieValue=="") { setCookie("IGTop100Vote","IG-Top-100-Vote-Popup-Cookie-24-Hours",1); $(".ajax").colorbox({ open:true}); } else{ } } $(document).ready(function() { checkCookie(); }) &lt;/script&gt; &lt;p&gt;&lt;a class='ajax' href="./content/ajax.html" title="Vote IG Top 100!"&gt;&lt;/a&lt;/p&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload