I would like a button to blink for a short duration prior to a AJAX call (and some other animations happening). The ajax call happens very fast so I do not want to use AJAX's before function. The blink must be distinct prior to any other animations. I feel as if there is a prettier way to do this:
//This is inside of a button click event
$(this).addClass('active').delay(250).queue(function (e) {
$(this).removeClass('active').delay(250).queue(function (f) {
alert(33);
$child.css('margin-left', $(window).width() + 10 + 'px');
$child.load(url + 'API CALL' + $(this).data("id"), bindAClicks);
});
});
bindAClicks - Animates to margin:0.
$child is a container div.
active is a class with a dark background.
What's wierd is that the alert is not even firing.