Skip to content

Instantly share code, notes, and snippets.

@dsturm
Last active September 27, 2021 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsturm/bc53191c89b307c6f0c3f9cdd92e4fa3 to your computer and use it in GitHub Desktop.
Save dsturm/bc53191c89b307c6f0c3f9cdd92e4fa3 to your computer and use it in GitHub Desktop.
Elementor
(function ($) {
$(document).on("elementor/popup/show", function (event, popupId, popup) {
var gformWrapper = $(".gform_wrapper", popup.$element);
if (!gformWrapper.length) {
return;
}
var gformId = ("" + gformWrapper.first().attr("id")).replace(
/^gform_wrapper_/,
""
);
if (!gformId.trim()) {
return;
}
$(document).trigger("gform_post_render", [gformId, 1]);
});
})(window.jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment