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
<?php | |
/** | |
* How to use: | |
* 1. Add this code to your website with any code snippets plugin or into functions.php of your active theme. | |
* 2. In your admin area go to JetEngine/Macros Generator, generate and copy macros you need. | |
* 3. Use this macros anywhere with shortcode in following format: [jet_engine_macros macros="%generated_macros%"] | |
* | |
* Real world example: | |
* [jet_engine_macros macros="%jet_engine_field_name|event_date|field_value%"] | |
*/ |
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 ($) { | |
$(document).on("jet-form-builder/ajax/on-success", function (event, response, form) { | |
console.log(event, response, form); | |
setTimeout(function () { | |
$(window).trigger({ | |
type: "jet-popup-close-trigger", | |
popupData: { | |
popupId: "jet-popup-3415", | |
constantly: false, | |
}, |
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
document.addEventListener("DOMContentLoaded", function () { | |
let refreshButton = document.querySelector("#refresh"); | |
let listing = document.querySelector("#topics"); | |
// Refresh Function | |
function reloadListingGrid(widget) { | |
const jetListingItems = widget.querySelector(".jet-listing-grid__items"); | |
const navData = jetListingItems.dataset.nav; | |
try { |
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 ($) { | |
$(document).on("jet-form-builder/ajax/on-success", function (event, response, form) { | |
console.log(event, response, form); | |
let submitForm = form[0]; | |
refreshListingGrids(); | |
setTimeout(function () { | |
submitForm.querySelector(".jet-form-builder-messages-wrap > div").remove(); | |
}, 500); | |
}); |