you just want to swap out the src attribute using a setInterval timer
var myAnim = setInterval(function(){
$(".myImageHolder").attr('src', nextImage);
}, 42);
The trick is how you generate nextImage
. This largely depends on the naming conventions of your images, or which direction you wish the animation to run in
Update
Or use a plugin