Hello!
Someone tell me, please, why when you click on the button from the first time, the notification does not appear smoothly, but from the second time smoothly.
Here is an example - link
And here is the code:
<a class="add-to-cart addtocard-product" href="#">Щёлкни</a> Js:
$(document).on('click', '.add-to-cart', function (e) { var tekst = $('<div id="message-success"><p>Привет! Меня показывают и скрывают:)</p></div>'), linc = $('#jGrowl'); linc.html(tekst).fadeIn(); setTimeout(function() {linc.fadeOut();}, 2000); });