From a887f6bbd7c294a1e5ec3f183b41846fe95df340 Mon Sep 17 00:00:00 2001 From: dev-krunal Date: Tue, 20 Feb 2024 15:54:09 +0530 Subject: [PATCH] Add trigger to avoid replace Iframe src for specific case. --- js/qsm-quiz.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js index d7113b107..3ead85a78 100644 --- a/js/qsm-quiz.js +++ b/js/qsm-quiz.js @@ -1343,6 +1343,8 @@ function qmnInitPagination(quiz_id) { jQuery(document).trigger('qsm_init_pagination_after', [quiz_id, qmn_quiz_data]); } jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after', function(event, quiz_id) { + jQuery(document).trigger('qsm_before_iframe_section',[quiz_id]); + let video_sections = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container').find('video'); let iframeVideos = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container .qsm-page, .qsm-quiz-container-' + quiz_id + '.qmn_quiz_container .qsm-auto-page-row').find('iframe'); let audio_sections = jQuery('.qsm-quiz-container-' + quiz_id + '.qmn_quiz_container').find('audio'); @@ -1360,6 +1362,8 @@ jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after this.pause(); } }); + + jQuery(document).trigger('qsm_after_iframe_section',[quiz_id]); }); function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) { var sTop = window.screen.height / 2 - (218);