【发布时间】:2017-12-07 09:36:06
【问题描述】:
使用复选框和 jQuery 帮助我进行 Bootstrap 开关切换 - 一个打开,另一个关闭。
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" onclick="change_ins(1)" class="switch switch-on toggle" checked value="true" id="toggle1">
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" onclick="change_ins(2)" class="switch switch-off toggle" id="toggle2">
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" onclick="change_ins(3)" class="switch switch-off toggle" id="toggle3">
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" onclick="change_ins(4)" class="switch switch-off toggle" id="toggle4">
<input type="checkbox" data-toggle="toggle" data-style="ios" data-size="normal" data-on="​" data-off="​" onclick="change_ins(5)" class="switch switch-off toggle" id="toggle5">
【问题讨论】:
-
看起来你没有太多时间写代码,非常准确,让我们看看你什么时候开始被否决
-
请准确回答您的问题
标签: javascript php jquery twitter-bootstrap