I have an awesome count down clock which works fine in chrome but does not work at all in IE. Thanks to Stack overflow user Roko for helping me out to put together the project. Would anyone have any idea how to get this work on IE?
Here is the JS
var fut = new Date("Dec 19 2013 21:15:00 UTC-05:00")
obj = {};
// Number splitter
function intSpl( i ){
i = Math.floor(i);
return [~~(i/10), i%10];
}
function drawTime(){
var now = new Date().getTime(),
dif = now<fut ? Math.floor( (fut-now)/1000) : 0;
obj.s = intSpl(dif % 60);
obj.m = intSpl(dif/60 % 60);
obj.h = intSpl(dif/60/60 % 24);
obj.d = intSpl(dif/60/60/24);
for(var key in obj){
if(obj.hasOwnProperty(key)){
for(var i=0; i<2; i++){
$('#'+ key+i).css({backgroundPosition: -obj[key][i]*50 });
}
}
}
}
drawTime();
setInterval(drawTime, 1000);
Here is the fiddle http://jsfiddle.net/qLTE2/7/