I have a jQuery function that I want to run after a form is successfully submitted. The function fades in a screen overflow then displays items in a list before redirecting to another url.
Here's the script:
<script >
function startCheck() {
var e = $(".overlay-checker"),
t = $(".overlay-checker-points > li");
for (t.hide(), e.fadeIn(), i = 0; i < t.length; i++) setTimeout(function() {
$(".overlay-checker-points").find(":hidden").first().fadeIn()
}, 1500 * (i + 1));
setTimeout(function() {
window.location = $(".redirectNow").attr("href")
}, 1500 * t.length + 2e3)
}
</script>
How do I run the above function after a form is successfully submitted?