0

.ajax()成功後に div をアニメーション化する必要がありますが、そうではありません。ajaxの前はできますが、関数内のajaxの後ではできません.done()。助けてください、私はすべてを試しました。

これが私のコードです:

$(".delete").click(function() {
   $this = $(this).closest(".photo");
   var url = $(this).parent().find("input[type=hidden]").val();
        $.ajax({url: '/content/delete.php',
              data: {id: url},
              dataType: 'json',
              type: 'post',
        }).done(function( output ) {
           if(output){
             $this.find(".slider").animate({margin: '0px'}, 200);
           }
        });
});
4

1 に答える 1