I have a sprite image used in background of a div, i want to change it's position after every 1 second.
i tried following code but it's not working:
var speed = 1000;
var height = 50;
for (var i=0; i<dummyArray.length; i++) {
$("#char").delay(speed).animate({'background-position': '0 ' + -(heigth*i) +'px'}, 0);
}
Any suggestion please?