Skip to content

Commit

Permalink
Update twu_moodle_course.js
Browse files Browse the repository at this point in the history
  • Loading branch information
inoklim-twu authored Jan 16, 2025
1 parent 3609dc0 commit 6f96fed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions twu_moodle_course.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
$(document).ready(function () {
$("select").change(function () {
$(this).find("option:selected").each(function () {
const iframes = document.querySelectorAll("iframe");
iframes.forEach((videoframe) => {
const iframePlayer = new Vimeo.Player(videoframe);
iframePlayer.pause();
});
var optionValue = $(this).attr("value");
if (optionValue) {
$(".toggle-box").not("." + optionValue).hide();
Expand Down

0 comments on commit 6f96fed

Please sign in to comment.