Skip to content

Commit

Permalink
Merge pull request #2472 from QuizandSurveyMaster/jh-custom-next-butt…
Browse files Browse the repository at this point in the history
…on-bug-86cuagqmy

Add trigger to avoid replace Iframe src for specific case.
  • Loading branch information
zubairraeen authored Feb 20, 2024
2 parents a1502f8 + a887f6b commit 234c0cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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);
Expand Down

0 comments on commit 234c0cf

Please sign in to comment.