feat: hide subsequent sections based on activity script presence
Enhance the visibility control of sections by adding a check for 'script[data-activity-id]'. If a section contains such a script, all following sections will be hidden to improve user focus and interface clarity.
This commit is contained in:
parent
dba761ac70
commit
bf9cc7445b
1 changed files with 7 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue