Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Javascript Countdown
// <b id="show-time">5</b>
<script type="text/javascript">
var settimmer = 0;
window.setInterval(function() {
var timeCounter = $("b[id=show-time]").html();
var updateTime = eval(timeCounter)- eval(1);
if(updateTime == 0){
window.location = ("redirect.php");
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.