I'm not really a js expert, but this seems to work:
Code:
$(document).ready(function() {
var countdown = 30;
$('#countdown').html(countdown);
setInterval(function() {
countdown--;
$('#countdown').html(countdown);
if (countdown <= 0)
{
$('.cameraimage').attr('src', $('.cameraimage').attr('src') + '?' + new Date().getTime());
countdown = 30;
$('#countdown').html(countdown);
}
}, 1000);
});
Then you need to insert something like:
Code:
<div>Image updates in: <span id="countdown"></span></div>