How to make uvedomlenie on adding to cart?

Hi, simple question for you
need. what would clicking the button to add a product, show the box that the item has been added and all
here is the website
https://www.ukr-metiz.com/store/spec-krepezh
and here is the code which I'm trying to write but I can't find the name of a particular product.

$(document).ready(function() {
 var $productItem = $('.products-list');
 var $addCart = $productItem.find('.submit a'); 
$addCart.click(function(){
 var $productName = $(this).closest('.product-list').find('.title a').text();
 // $('.content-wrapper').before('<div class="show"><span>X</span><p>'+$nameProduct+ added to cart!'</p></div>')
console.log($productName);
});

});
March 23rd 20 at 19:16
1 answer
March 23rd 20 at 19:18
$(document).ready(function() {
 var $productItem = $('.products-list');
 var $addCart = $productItem.find('.submit a'); 
$addCart.click(function(){
 var $productName = $(this).closest('tr').find('.title a').text();
 setTimeout(function() { $('.alert-wrp').append('<div class="alert"><spanx>X</span><p>'+$productName+'</p>Added to your cart!</div>'); }, 1000);
});
 $('.alert-wrp .alert span').click(function(){
$('.alert').remove();
});
});

Find more questions by tags jQuery