Forum Discussion
EricR
7 years agoCommunity Member
Hide personnal tabs in the player ?
Hi Community
In SL2, I have added personnal tabs in the player.
For some slides, I want to hide some tabs using the "Player Features" in the "Slide Properties" of these slides. However I can onl...
OwenHolt
5 years agoSuper Hero
You can use JavaScript (technically JQuery) to accomplish this.
- Find your custom tabs and give them a unique ID.
You can do this "At timeline start" on your very 1st slide. All of your custom tabs have the same ID so changing this to a unique ID will give you more control. The following example is for a course with 2 custom tabs. It will update the id's to tab1 and tab2. "tab1" will be the first tab found searching from left to right across the bar.
$("#tab-customlink").attr("id", "tab1");
$("#tab-customlink").attr("id", "tab2"); - Now that they have a unique ID, you can execute more code whenever you want to hide them or show them. For example, if I wanted to hide the 2nd tab but leave the 1st one visible, I would use the following:
$("#tab2").hide();
If I wanted to now show the hidden 2nd tab and hide the first one, I would do the following:
$("#tab1").hide();
$("#tab2").show();
- JenniferWalk6523 years agoCommunity Member
Hey, Owen. How does one locate the ID of a tab and then change it?
I see how to execute JavaScript and then enter the code, but I cannot locate the ID of any tabs.
Thanks.