[eluser]SPeed_FANat1c[/eluser]
After image deletion from server I want to remove the span with this this picture, delete link and radio button. Span looks like this:
Code:
<span class="article_img">
<img src="http://localhost/darzelis/uploads/naujienos/naujiena.jpg">
<input type="radio" name="image" value="http://localhost/darzelis/uploads/naujienos/naujiena.jpg">
<a class="trinti_img" href="" id="naujiena.jpg"><img src="http://localhost/darzelis/images/admin/delete.png"></a>
</span>
Code:
$('a.trinti_img').live('click',function(){
name = this.id;
jConfirm('Ar tikrai norite ištrinti?', 'Patvirtinimas', function(r) {
if(r){
$.post(CI.base_url + 'admin_/naujienos/delete_picture_ajax/'+name,{filename: name}, function(data) {
if(data != 'not_admin') //this is true
$(this).parent().remove();
//console.log('test');
});
} //if r
});
return false;
});
So the span is parent if I understand well. Where is my mistake?