I am working on this piece of code using the jQuery Countdown Plugin it works but how ever if i try using a function with " function showPauseTime ()" I keep getting an error showPauseTime undefined.
Can any body take a look at the code and tell me how I could solve this thanks
$('#beginExercise').click(function() {
//check if terms checkbox is checked before stating timer
if($('#terms').is(':checked')){
$("#pauseButton").show();
//start time at zero
$("#elapsTimer").countdown({since: 0,onTick:showPauseTime});
//Allow the Elaps Timer to be paused
$('#pauseButton').toggle(function() {
$(this).text('Resume Exercise');
$('#elapsTimer').countdown('pause');
},
function() {
$(this).text('Pause Exercise');
$('#elapsTimer').countdown('resume');
});
function showPauseTime(periods) {
$('#showPauseTime').text(periods[4] + ':' + twoDigits(periods[5]) +
':' + twoDigits(periods[6]));
}
} //end if
});