Created
January 15, 2025 06:27
-
-
Save VictorPietro/11a592339899e1d9d3331363d1aa9431 to your computer and use it in GitHub Desktop.
Close a JetPopup after successful JetFormBuilder submit
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
jQuery(document).ready(function($) { | |
// Listen for the JetFormBuilder submit success event | |
$(document).on('jet-form-builder/ajax/on-success', function() { | |
// Wait for 2 seconds after the form is successfully submitted | |
setTimeout(function() { | |
// Simulate a click on the popup close button | |
$('.jet-popup__close-button').trigger('click'); | |
}, 2000); // Time in milliseconds (2 seconds) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment