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 .
×

[question] How to show only a specific with tag

I would like to create a custom sheet of rules with different abilities depending on the job. If I select a job from the drop-down menu, I want to print a template suitable for the job. what should I do? I try the code like this, but it didn't work well. html           <div class = "sheet-tribe" >             <span> 종족 </span>             <select class = "sheet-slt_tribe" title = "종족" name = "attr_tribe" >               <option value = "human" class = "sheet-slt_tribe" selected > 인간 </option>               <option value = "animal" class = "sheet-slt_tribe" > 수인 </option>               <option value = "jinn" class = "sheet-slt_tribe" > 정령 </option>             </select>           </div> css .box {     display : none ;     margin-top : 20px ; script <script type = "text/worker" >   $(document).ready( function (){     $( ".sheet-slt_tribe" ).change( function (){         $( this ).find( "option:selected" ).each( function (){             var optionValue = $( this ).attr( "value" );             if (optionValue){                 $( ".box" ).not( "." + optionValue).hide();                 $( "." + optionValue).show();             } else {                 $( ".box" ).hide();             }         });     }).change(); }); </script>
1643780733

Edited 1643780762
vÍnce
Pro
Sheet Author
Hi 도로롱, I would start by reading the Building Character Sheets if you haven't done so.&nbsp; Sheetworkers(Javascript) is only allowed to manipulate attribute data on roll20. No DOM access. ;-(&nbsp; You can use js to set attributes, but you will need to use css to handle hiding/showing sections of your sheet.&nbsp; Here are some examples from the CSS Wizardry page on how to hide/show: <a href="https://wiki.roll20.net/CSS_Wizardry#Show.2FHide_Areas" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Show.2FHide_Areas</a>
Dear&nbsp; vÍnce It's completely resolved! Thank you so much!!