"self":
function handler(DATA) {
var self = this;
$.ajax({
"url":"file.php",
"type":"post",
"data":DATA,
"success":function() {
},
"error":function(){
alert("ERROR!")
}
});
}
- jQuery... , , .
function handler(DATA) {
var success = $.proxy(function(){
}, this);
$.ajax({
"url":"file.php",
"type":"post",
"data":DATA,
"success":success,
"error":function(){}
});
}