Take the 2-minute tour ×  So I've got a header image that upon
being clicked animates with transit, fades out, and fades back
in with a new image. I'm then able to click on the new image and
it will also animate and fade out to blank space. How can I
continuously animate/fade through a series of ordered images -
one new image per click ad infinitum?  Here's what I've got so
far...          $("#headimg").transition({ skewY: '30deg'
},1000);         $("#headimg").fadeOut(function() {
$(this).transition({ skewY: '00deg' }) .load(function() {
$(this).fadeIn(); });          $(this).attr("src",
"/imgurl.jpg"); share|improve this question add comment  2
Answers  You can use the javascript function called
setInterval(); like this:     //this code will keep on executing
on every 2 seconds. share|improve this answer add comment  The
following snippet doesn't solve your problem exactly, but it
might put you on the right track, as it randomly cycles through
a set of 28 images with fading in and out. You can