誰かが選択要素で特定の「オプション」を選択したときの自動非表示/表示機能を作成しようとしています。「セレクター」について私が持っているものは次のとおりです。
<li id="foli16" class="name notranslate">
<label class="desc" id="title16" for="Field16">
Repeat Pattern
<span id="req_16" class="req"></span>
</label>
<span class="left">
<select id="Field16" style="margin-left: 0px;" name="" class="field select">
<option value="" <?php echo $doc_selected; ?>>None</option>
<option value="" <?php echo $doc_selected; ?>>Daily</option>
<option value="" <?php echo $doc_selected; ?>>Weekly</option>
<option value="" <?php echo $doc_selected; ?>>Monthly</option>
<option value="" <?php echo $doc_selected; ?>>Yearly</option>
</select>
</span>
<p class="instruct" id="instruct16"><small>How often does this test occur?</small></p>
</li>
誰かが「毎日」オプションを選択すると、「毎日」の id を持つ div が表示されます。別のものを選択した場合は、表示されているものを閉じて、新しい選択を表示する必要があります。
以前にクリック ボタンと 1 つのトグルを使用してこれを行ったことがありますが、特に選択「オプション」を使用して、このような大きなトグルに対してこれを記述する方法がわかりません。私のオプションにもIDが必要になると思います。