reference self in ajax callback code example
Example: reference self in ajax callback
$.ajax({
context: this,
type: 'post',
url: '',
data: 'action='+$action+'&user_id='+$user_id,
success: function(response){
//can access this now!
}
});