Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Need some more assistance

1515428528
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I cannot get the checkbox to hid the cells below it HTML <div class="sheet-closecombat"> <div class="sheet-row sheet-inputs"> <div class="sheet-cell sheet-col520"><input class="sheet-boolean" type="checkbox" name="attr_closecombat" value="1"/></div> <div class="sheet-cell sheet-col521">Close Combat</div> </div> <div class="sheet-CCBT-content"> <div class="sheet-row sheet-inputs"> <div class="sheet-cell sheet-col510"><div class="sheet-popup">Shield DB</div><span class="sheet-tooltip">Enter Shield DB<br /></span></div> <div class="sheet-cell sheet-col511"><input type="number" name="attr_CCBTshielddb" value="0" max="0" min="-10" /></div> <div class="sheet-cell sheet-col516"><input class="sheet-boolean" type="checkbox" name="attr_grappled" value="-4" /></div> <div class="sheet-cell sheet-col517"><div class="sheet-popup">Grappled</div><span class="sheet-tooltip"> Grappled [B371]:<br />MELEE: -4<br />RANGED ATTACKS IMPOSSIBLE<br />Actions After Being Grappled</span></div> </div> </div> </div> CSS div.sheet-CCBT-content { display:none;} input.sheet-closecombat[type="checkbox"][name="attr_closecombat"][value="1"]:checked ~ div.sheet-CCBT-content { display: block;} help is always apreciated
1515435098

Edited 1515436136
Finderski
Pro
Sheet Author
Compendium Curator
Your checkbox is two divs distant from the DIV it needs to be next to.  You could move it completely out of the current div structures, or just do another checkbox with the exact same name and place it immediately "in front of" the div you want to show/hide. EDIT: You can hide the second checkbox that placed in front of the div it's supposed to show/hide, so it's not visible. To do that, just add this to the input tag: style='display:none;'