I have a timer that runs for two minutes. It initially displays the time as
2:00
when I click on the start, time starts to decrease. It works fine, but I want 2 things that I cannot achieve
1) Upon completion of the timer, which has reached 0:00, it should return to the original value of 2:00 2) I want to make sure that this time must be synchronized exactly with the server time.
here is my code.
<script>
$(document).ready(function () {
$("#startClock").click(function () {
$("#startClock").fadeOut().delay(120000).fadeIn();
$("#submitamt").fadeIn().delay(120000).fadeOut();
$("#walkaway").fadeIn().delay(120000).fadeOut();
});
});
</script>
<span id="count">2:00</span>
<button type="submit" name="submit" id="startClock" value="Submit">Start</button>
<button type="submit" name="submit" id="submitamt" value="Submit">Submit</button>
<button type="submit" name="submit" id="walkaway" value="Submit" style="display:none" >Walk Away</button>
Can anyone tell me how to do this
source
share