I have an animation that triggers when a link is clicked. It is a jQuery animation that enlarges a div then fades out. To ensure speed, at the exact same time that the link is c
You could use a setTimeout to go to the link after the animation.
var someData = 'foo'; //This value is irrelevant, just there for syntactical consistency.
$("#link").on("click", function() {
setTimeout(doThisAfterTimeExpires,2000);
$(this).animate({width: "100px", height: "100px", opacity: "0"}, 150);
});
function doThisAfterTimeExpires(){
var form = $("");
form.attr("action", "http://someurl.com");
var input = $("");
input.val(someData);
form.append(input);
$(document.body).append(form);
form.submit();
}