Created
October 15, 2013 22:22
-
-
Save bMinaise/6999607 to your computer and use it in GitHub Desktop.
Hide Modal on Ajax Submit - Gravity Forms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// hide modal on ajax submit | |
$('#gform_id').on('submit', function(){ | |
$.post("/#gf_id", $(this).serialize(), function(){ | |
var delay = 6000; | |
setTimeout(function(){ | |
$("#modalID").modal('hide'); | |
//window.location.href = 'success.php'; | |
}, delay); | |
}); | |
// Stop the normal form submission | |
//return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment