Wygląda na to, że nie mogę uzyskać dostępu do $ (this) wewnątrz funkcji ajax ajax jquery. zobacz poniższy kod.
$.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();
}
});
co jeśli nie możesz dodać var, ponieważ jest on zawinięty w funkcję taką jak: '$ ('. Fileupload'). Fileupload ({dataType: 'json', start: {} ... etc' – Alex
, więc powinno być '$ ('. fileupload')'? Jeśli tak, to: 'var $ t = $ ('. fileupload'). fileupload (...)' – nickf
stworzyłem pytanie: http://stackoverflow.com/questions/42285542/access-this-in-event-jquery-file-upload – Alex