<div id="counter">5 secondsdiv>
<a id="skip-ads">Skip Adsdiv>
Thursday, October 6, 2011
Posted by Dajosh at 9:44 PM
Subscribe to:
Post Comments (Atom)
setTimeout(function() { document.getElementById("skip-ads").style.display = 'block'; }, 5000); var counter = 5; // seconds var count_func = function() { counter -= 1; document.getElementById("counter").innerText = counter + ' seconds'; if (counter === 0) { document.getElementById("skip-ads").style.display = 'block'; document.getElementById("counter").style.display = 'none'; } else { setTimeout(count_func, 1000); } }; count_func();
0 comments:
Post a Comment