JQuery ajax başarı fonksiyonunun içinde $ (this) 'a erişemiyorum. lütfen aşağıdaki kodlara bakınız.
$.ajax({
type: 'post',
url: '<?php echo site_url('user/accept_deny_friendship_request')?>',
data: 'action='+$action+'&user_id='+$user_id,
success: function(response){
//cannot access $(this) here $(this).parent().remove();
}
});
Eğer varyantı ekleyemiyorsanız, örneğin: $ ('. Fileupload') gibi bir işleve eklenmiş olsaydınız, fileupload ({dataType: 'json', start: {} ... etc' – Alex
'$ ('. fileupload ') '? olmalıdır. Eğer öyleyse, o zaman:' var $ t = $ ('. fileupload '). dosya yükleme (...) ' – nickf
Bir soru oluşturdum: http://stackoverflow.com/questions/42285542/access-this-in-event-jquery-file-upload – Alex