Skip to content
jQuery(document).ready(function($) {
// Trigger AJAX call when the pop-up is opened
$('.elementor-popup').on('popup:open', function() {
$.ajax({
url: ajax_object.ajax_url,
type: 'POST',
data: {
action: 'fetch_latest_question',
security: ajax_object.security
},
success: function(response) {
$('.question-content').html(response);
}
});
});
});
var ajax_object = {
ajax_url: '',
security: ''
};