As far as I understand, .delay () does not work with .addClass and .removeClass, how can you implement the similarity of such a structure:
$('.element_1').click(function(){ $(this).addClass('element_2').delay(1000).removeClass('element_2'); }); So that when you click a class, you add a class, and then delete it and when you click again on an element, the same thing happens. .toggleClass is not appropriate in this case.
The bottom line is that after the click, CSS animation takes place via @keyframes.
setTimeout(). - Ihor Tkachuk