diff --git a/js/qsm-quiz.js b/js/qsm-quiz.js index 7d7ee9796..c378204a3 100644 --- a/js/qsm-quiz.js +++ b/js/qsm-quiz.js @@ -1334,6 +1334,7 @@ function qmnInitPagination(quiz_id) { jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after', function(event, 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`).find('iframe'); + let audio_sections = jQuery(`.qsm-quiz-container-${quiz_id}.qmn_quiz_container`).find('audio'); iframeVideos.each(function() { let src = this.src; jQuery(this).attr('src', src); @@ -1343,6 +1344,11 @@ jQuery(document).on('qsm_next_button_click_after qsm_previous_button_click_after this.pause(); } }); + audio_sections.each(function() { + if (!this.paused) { + this.pause(); + } + }); }); function qmnSocialShare(network, mlw_qmn_social_text, mlw_qmn_title, facebook_id, share_url) { var sTop = window.screen.height / 2 - (218);