Why is the function .after not running in functions .done?

I have a ajax script which sends data and then a function .done performs the action?
All actions except .after performed... outside the function .done carrying out this function
$('.product_full_favorite').on('click', function(e) {
e.preventDefault();
 var id_fav = $(this).closest('.product_full_item').prop('id');
$(this).hide();
$.ajax({
 url: 'scripts/add_favorite.php',
 method: 'POST',
 dataType: 'text',
 data: {id_fav}
 }).done(function(data) {
 //$('.alerts > .alert').text(data);
//$('.alerts').fadeIn();
 $('.favorites > span').after('<span class="favorites_row">1</span>');
 //setTimeout(function() {
//$('.alerts').fadeOut()
 //}, 5000);
 })

Everything in zakomentiroval be carrying out.
June 3rd 19 at 21:03
1 answer
June 3rd 19 at 21:05
I'm an idiot, did not write in the functions differ.

Find more questions by tags jQuery