我正在使用 query mobile 1.4.0 并且我试图让我的翻转开关默认处于活动状态,但我不确定如何处理它。我试过添加selected="selected"
,<input>
但似乎没有什么不同。有人有想法么?
<form>
<div class="prof-wrap">
<div class="prof-left">
<div class="prof-txt-wrap">
<div class="text-off">OFF TITLE</div>
<div class="text-off2">OFF TYPE</div>
</div>
</div>
<!-- END prof-left -->
<div class="prof-mid">
<div class="prof-switch">
<input type="checkbox" data-role="flipswitch" name="flip-checkbox-4" id="flip-checkbox-4" data-wrapper-class="custom-size-flipswitch" selected="selected">
</div>
<!--END prof-mid -->
</div>
<!-- END prof-switch -->
<div class="prof-right">
<div class="prof-txt-wrap2">
<div class="text-active">ON TITLE</div>
<div class="text-active2">ON TYPE</div>
</div>
</div>
<!-- END prof-right -->
</div>
<!-- END prof-wrap -->
</form>