Note that there are some explanatory texts on larger screens.

plurals
  1. PORemove a first jquery element if cookie exists
    primarykey
    data
    text
    <p>I am trying to make a after x seconds display another table,so far im doing great. I need to place 'Wait after x seconds' only once so i need to create a cookie,and check if cookie exists let only the the direct div.</p> <p>Explained: -First time user =you can check content after x seconds -Repeating user=goes directly to content </p> <p>Needed:ability to create a cookie,check if user is repeated=break the first div and go directly to 2nd one. This is what i got:</p> <pre><code>&lt;style&gt; #picOne, #picTwo { position:absolute; display: none; } #pics { width:100px; height:100px; } &lt;/style&gt; &lt;script type = "text/javascript"&gt; /*author Philip M. 2010*/ var timeInSecs; var ticker; function startTimer(secs){ timeInSecs = parseInt(secs)-1; ticker = setInterval("tick()",1000); // every second } function tick() { var secs = timeInSecs; if (secs&gt;0) { timeInSecs--; } else { clearInterval(ticker); // stop counting at zero // startTimer(15); // remove forward slashes in front of startTimer to repeat if required } document.getElementById("countdown").innerHTML = secs; } startTimer(15); // 15 seconds &lt;/script&gt; &lt;script src="http://code.jquery.com/jquery-1.4.4.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#picOne').fadeIn(0500).delay(15000).fadeOut(000); $('#picTwo').delay(15000).fadeIn(1500); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="pics"&gt; &lt;div id="picOne"&gt; Your video will begin in &lt;span id="countdown" style="font-weight: bold;"&gt;15&lt;/span&gt; &lt;/div&gt; &lt;div id="picTwo"&gt;//something&lt;/object&gt; &lt;/div&gt; &lt;/div&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