所以我正在使用jQuery Mobile能够使用fieldset属性水平显示复选框 Data-Type =“Horizontal”;然而,即使所有的复选框图标都应该隐藏起来,其中一个似乎正在向表面进行战斗,正如Landmine选择所示:
为什么会这样?
<!--Mechanism of Injury-->
<label id="tcInjuryMechLabel" for="tcInjuryMech">
<h3 id="tcInjuryMechHdr" class="headers">
Mechanism of Injury: (Choose all that apply)
</h3>
</label>
<fieldset id="tcInjuryMech" data-role="controlgroup" data-type="horizontal">
<label id="tcInjuryMechOp1Label" for="tcInjuryMechOp1">
Artillery
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp1" value="Artillery">
<label id="tcInjuryMechOp2Label" for="tcInjuryMechOp2">
Blunt
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp2" value="Blunt">
<label id="tcInjuryMechOp3Label" for="tcInjuryMechOp3">
Burn
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp3" value="Burn">
<label id="tcInjuryMechOp4Label" for="tcInjuryMechOp4">
Fall
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp4" value="Fall">
<label id="tcInjuryMechOp5Label" for="tcInjuryMechOp5">
Grenade
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp5" value="Grenade">
<label id="tcInjuryMechOp6Label" for="tcInjuryMechOp6">
GSW
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp6" value="GSW">
<label id="tcInjuryMechOp7Label" for="tcInjuryMechOp7">
IED
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp7" value="IED">
<label id="tcInjuryMechOp8Label" for="tcInjuryMechOp8">
Landmine
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp8" value="Landmine">
<label id="tcInjuryMechOp8Label" for="tcInjuryMechOp8">
MVC
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp8" value="MVC">
<label id="tcInjuryMechOp9Label" for="tcInjuryMechOp9">
RPG
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp9" value="RPG">
<label id="tcInjuryMechOp10Label" for="tcInjuryMechOp10">
Other (Specify Below)
</label>
<input type="checkbox" name="tcInjuryMechOp[]" id="tcInjuryMechOp10" value="Other" onchange="enableOtherMech();">
</fieldset>
<div id="tcInjuryMechOtherDiv">
<input type="text" name="tcInjuryMechOther" id="tcInjuryMechOther" placeholder="Other(Specify)" disabled>
</div>
答案 0 :(得分:2)
您已将<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table><tbody>
<tr id="15">
<td>1</td>
<td class="hidden-mob">
<a href="page.php"><i class="fa fa-caret-up">x</i></a>
</td>
<tr>
<tr id="16">
<td>1</td>
<td class="hidden-mob">
<a href="page.php"><i class="fa fa-caret-up">x</i></a>
</td>
<tr>
</tbody>
</table>
用于2个不同的复选框(Landmine和MVC)。
只需使所有ID都独一无二,您的问题就会消失。