Change the click event handler to:
li.hide().insertBefore('#displayFiles').slideDown('slow').find('.delete_image_upload').click(function () {
var currentLi = $(this).parent();
currentLi.fadeOut('slow')
count-=1;
if(count<limit) {
jQuery('.well').show();
}
//urmatoarele linie este pentru a ascunde div de la //recuerda que con fotos tu anuncio sera mas visible
if(count==0) {
jQuery('div.text_upload2').show().slideDown('fast');
}
jQuery.ajax({
url: base_url + 'uploadify/delete_file2/'+name+'/<?php echo $item['id']; ?>',
success: function (response) {
currentLi.remove()
}
});
return false
});
I hope that helped.
Best regards,
Minko
------------------------------------------