I am trying to imbed multiple tabs into my sheet. I tried following the info at <a href="https://wiki.roll20.net/CSS_Wizardry#Tabs" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Tabs</a> and couldn't get it to actually switch between tabs when clicked on. I even went as far as just copy-pasting the code there and still nothing. Any idea how to make this work? <input type="hidden" class="sheet-tabstoggle" name="attr_sheetTab" value="character" />
<div>
<button type="action" name="act_character" >Character</button>
<button type="action" name="act_journal" >Journal</button>
<button type="action" name="act_configuration" >Configuration</button>
</div>
<div class="sheet-character">
<h2>Character</h2>
<span>character Stuff Goes here </span>
</div>
<div class="sheet-journal">
<h2>Journal/Notes</h2>
<span>Journal/Notes Stuff Goes here</span>
</div>
<div class="sheet-config">
<h2>Config/Settings</h2>
<span>Sheet Config/Settings goes here</span>
</div>
<script type="text/worker">
const buttonlist = ["character","journal","configuration"];
buttonlist.forEach(button => {
on("clicked:${button}", function() {
setAttrs({
sheetTab: button
});
});
});
</script> /*Configure the tab buttons*/
.charsheet .sheet-character,
.charsheet .sheet-config,
.charsheet .sheet-journal {
display: none;
}
/* show the selected tab */
.charsheet .sheet-tabstoggle[value="character"] ~ div.sheet-character,
.charsheet .sheet-tabstoggle[value="configuration"] ~ div.sheet-config,
.charsheet .sheet-tabstoggle[value="journal"] ~ div.sheet-journal {
display: block;
}