我应该如何调用3个函数来一个接一个地执行它们?
如果我需要一个接一个地调用这个函数,
        $('#art1').animate({'width':'1000px'},1000);        
        $('#art2').animate({'width':'1000px'},1000);        
        $('#art3').animate({'width':'1000px'},1000);我知道在jQuery中我可以做类似的事情:
        $('#art1').animate({'width':'1000px'},1000,'linear',function(){
            $('#art2').animate({'width':'1000px'},1000,'linear',function(){
                $('#art3').animate({'width':'1000px'},1000);        
            });        
        });但是,我们假设我没有使用jQuery而且我想调用:
some_3secs_function(some_value); some_5secs_function(some_value); some_8secs_function(some_value);
我应该如何调用这个函数来执行some_3secs_function,然后在该调用结束后,然后执行some_5secs_function并在该调用结束后再调用some_8secs_function?
更新:
这仍然无效:
    (function(callback){
        $('#art1').animate({'width':'1000px'},1000);
        callback();
    })((function(callback2){
        $('#art2').animate({'width':'1000px'},1000);
        callback2();
    })(function(){
        $('#art3').animate({'width':'1000px'},1000);
    }));三个动画同时开始
我的错误在哪里
繁花不似锦
慕的地10843
相关分类