clock();
function clock(){
var d=new Date();
var hour = d.getHours();
var minute = d.getMinutes();
$('#hr1').css('text-indent', '-'+hour.charAt(hour.length-2)*50+'px');
$('#hr2').css('text-indent', '-'+hour.charAt(hour.length-1)*50+'px');
$('#min1').css('text-indent', '-'+minute.charAt(minute.length-2)*50+'px');
$('#min2').css('text-indent', '-'+minute.charAt(minute.length-1)*50+'px');
clock();
}
I need help updating my jQuery clock. setInterval and looping the function doesn't seem to work. The variables are updating well but the css properties are not. Basically, my clock works by pushing the images off a <li> tag so the it shows only one number. The position of the the image is suppose to change with the time. The only correct time I get is when I refresh the page.
Any help is appreciated.