diff --git a/script.js b/script.js index 0832322..de9ba66 100644 --- a/script.js +++ b/script.js @@ -211,6 +211,13 @@ $(currentScript).closest("li.section").attr("id") ); }); + + sections.each(function (index) { + if ($(this).find('script[data-activity-id]').length > 0) { + // Hide all .section elements after this one + sections.slice(index + 1).css('visibility', 'hidden'); + } + }); }) }) .catch((error) => {