You can use setTimeout()
Do this:
$("form").submit(function(){
setTimeout(function() {
window.location = 'minha URL';
}, 5000);
}
After clicking the button will execute the function setTimeout()
that receives a function to be executed and the time in milliseconds, after that time it performs the function passed.
You can still assign the function to a variable to be able to cancel later, for this you would use the function clearTimeout()
receiving the variable with the function to be canceled:
$("form").submit(function(){
var timeout = setTimeout(function() {
window.location = 'minha URL';
}, 5000);
//Parar timeout
clearTimeout(timeout);
}