I use this jquery countdown
What i want with the countdown is that it restart every day at 14:00. When the counter reach 14:00 o'clock it should restart automatically and go to 23h:59m:59s
Right now it count down and when it reach my time it sticks at 00:00:00. If i manually refresh the page the countdown starts again.
I have watch this post but i wo't help me with the restart
Here is the code I use:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1 /jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>
<script type="text/javascript">
function doCountdown() {
var todaysNoon = new Date(),
nextNoon = new Date();
todaysNoon.setHours(14, 00, 0);
if (todaysNoon <= nextNoon) {
nextNoon.setDate(nextNoon.getDate() + 1);
}
nextNoon.setHours(14, 00, 0);
$('#defaultCountdown').countdown({
until: nextNoon,
description: '',
onExpiry: function() {
doCountdown()
}
});
}
$(window).load(function() {
doCountdown();
});
</script>
HTML:
<h1>Text here</h1>
<p>Some text here.</p>
<div id="defaultCountdown"></div>