JSDeferredいいわー

$.(get|post)を順次実行したかったのでnextがカオスったけどおもろかった。

    $.get("hoge").next(function(status){
        console.dir(status);
        console.log("first");
        return status;
    }).next(function(status) {
        $.post("hage", {
            prop1:status.username, prop2:status.time 
        }).next(function(status){
            console.log("second2");
            console.dir(status);
            return status;
        }).next(function(status) {
             console.log("third");
             console.dir(status);
             $.ajax({
                url: "abc",
                type: "get",
             });
        });
    });

ちょっとこんがらがったけど楽しかった。