Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trigger to avoid replace Iframe src for specific case. #2472

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading