After some exploration in my previous post about creating banners, I have gained a better understanding of some new concepts...
function animate(el)
{
var div = $(el);
return div.css("display","block").animate({width:0},1).animate({width:1100},2000).delay(4000).hide(1);
}
$(document).ready(function(){
var dfd = $.Deferred(),
chain = dfd;
var slide = ['#img2'];
$.map(slide, function(el) {
chain = chain.pipe(function() {
return animate(el).promise();
});
});
return dfd.resolve();
});
I have shared my code here and now I am looking for ways to make it continuous. Currently, the slide array finishes without displaying any additional pictures. My goal is to repeat the entire sequence.