失敗した jQuery メソッドからオブジェクト自身の関数にアクセスしたい。
function obj(){
this.send = function(){
$.get("send.php",null,function(data){
this.success();
}).error(function(){ this.fail(); });
}
this.fail = function(){
alert("fail");
}
}
var o = new obj();
o.send();
このエラーが発生します:TypeError: this.fail is not a function
fail
jQuery内の関数にアクセスするには?