I have something like :
$('#test').bind('go', function(event, top, left,w,h) {
$('#test').animate({left: left, top : top, width: w,height: h},1000,function() {
$('#test').animate({left: 0, top :0, width: w,height: h},1000) ;
})
});
$('#test').trigger('go', [150, 200,100,80]);
$('#test').trigger('go', [250, 200,100,80]);
$('#test').trigger('go', [350, 200,100,80]);
but the 2nd et 3rd trigger start before the end of the first one. i want the next main.trigger start when the previous is complete.
Try it : http://jsfiddle.net/9NLrR/6/
thanks
test this:
and script: