I'm using the keith-wood Countdown in the following script.
<script type="text/javascript" src="jquery.countdown.js"></script>
<script type="text/javascript">
$(function () {
$('#defaultCountdown').countdown({
until: +60,
format: 'yodhmS',
layout: '{y<}{yn}a, {y>}{o<}{on}m, {o>}{d<}{dn}g, {d>}{h<}{hn}o, {h>}{m<}{mn}m, {m>}{s<}{snn}s{s>}'
});
});
I want to reset the countdown when the user clicks Reset button. I've tried the following solution but it doesn't work. I get the following error: "Uncaught Unknown command: change"
$(document).ready(function() {
$('#reset').click(function() {
$('#defaultCountdown').countdown('change', {until: +60});
});
});
</script>
<div id="defaultCountdown"></div>
<input type="button" id="reset" value="Reset" />
Can someone help me? Thank you!