JSFiddle - React, Tailwind, and code Playground
HTML
Click the image to see the delay work with queue().
<br><br>
<img src='https://www.google.com/intl/en_com/images/srpr/logo3w.png'>
JavaScript
var image = $('img').click(function() {
image.delay(1500)
.queue(function( nxt ) {
$(this).css({"visibility":"hidden"}).removeClass("image-background");
nxt(); // continue the queue
});
});