In my previous post i asked about making banner, after some searching i grasp some more 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();
});
Here is my code, i am wondering to make it continous, when the slide array finish it doesnt display any more pictures. I want to repeat the whole sequence.