我无法检查/取消选中Accordion小部件中的单选按钮。
这是我的代码:
<SCRIPT LANGUAGE="JavaScript">
$(function() {
$( "#accordion" ).accordion();
});
</SCRIPT>
<div id="accordion" >
<input type="radio" id="worddoc" name="submissionType">Upload Word
<div>
<input type="file"/>
</div>
<input type="radio" id="pdfdoc" name="submissionType">Upload Pdf
<div>
<input type="file"/>
</div>
</div>
答案 0 :(得分:0)
检查
<SCRIPT LANGUAGE="JavaScript">
$(function() {
$( "#accordion" ).accordion();
});
</SCRIPT>
<div id="accordion" >
<div>
<input type="radio" id="worddoc" name="submissionType"> Upload Word
<input type="file"/>
</div>
<div>
<input type="radio" id="pdfdoc" name="submissionType">Upload Pdf
<input type="file"/>
</div>
</div>
答案 1 :(得分:0)
您只需为每个手风琴选项添加标题,如下所示:
<div id="accordion" >
<h1>Option 1</h1>
<div>
<input type="radio" id="worddoc" name="submissionType" /> Upload Word
<input type="file"/>
</div>
<h1>Option 2</h1>
<div>
<input type="radio" id="pdfdoc" name="submissionType" />Upload Pdf
<input type="file"/>
</div>
</div>
<script>
$(function() {
$("#accordion").accordion();
});
</script>
见JSFiddle。如果这不是您的意思,请告诉我。