Last active
March 4, 2025 03:10
-
-
Save VictorPietro/73c9b159bc264a7ee873a5703e88f77d to your computer and use it in GitHub Desktop.
AJAX Reload Listing/Table and JetPopup after 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($) { | |
$('.micro-unit-type-submit-button').on('click', function() { | |
let listingSelector = '.elementor-element-085ed4a'; // Your listing grid selector | |
// Reload title | |
$('.elementor-element-bdcf9fb').load(window.location.href + ' .elementor-element-bdcf9fb'); | |
// Reload the listing grid | |
$(listingSelector).load(window.location.href + ' ' + listingSelector, function() { | |
console.log('Listing reloaded!'); | |
// Reinitialize JetPopup for Elementor-based popups | |
if (window.JetPopupFrontend && typeof window.JetPopupFrontend.maybeElementorFrontendInit === 'function') { | |
window.JetPopupFrontend.maybeElementorFrontendInit($(listingSelector)); | |
console.log('JetPopup popups reinitialized successfully!'); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment