Forum Discussion
WilliamRyan-dba
3 months agoCommunity Member
Conditionally hide scene
Hi all,
I am working on a multilingual course and have set the menu to visible. I have it structured so that language 1 is in scene 1 to 10, and language 2 is in scene 11 to 20.
When the learner...
MathNotermans-9
3 months agoCommunity Member
Basically this is what you need.
const listElements = document.querySelectorAll('li div.cs-listitem.listitem');
for(var i = 0 ; i < listElements.length; i++){
listElements[i].id = 'list_'+i;
console.log("list "+i);
if(i > 4){
listElements[i].style.visibility="hidden";
}
}
Depending on the exact setup of your project you need to figure out which of the listitems, as the menu in Storyline is just a <li> you want to hide.
Here you can see a working sample.
https://360.articulate.com/review/content/716c1463-079c-4b71-90db-fb59ede46e4f/review
And attached my sample.
As in my sample you can switch languages/li-items, there is an extra line to show all li's.
Kind regards,
Math