引导 开关 v3.3.2 - 零件

我们为交换机添加了一个新设计,使其看起来像仪表板的其余部分。

有关详细信息,请查看[完整文档](https:github.com Bttstrp bootstrap-switch){:target =“_ blank”}

<div class="togglebutton">
  <label>
    <input type="checkbox" checked="">
      <span class="toggle"></span>
      Toggle is on
  </label>
</div>
<div class="togglebutton">
  <label>
    <input type="checkbox">
      <span class="toggle"></span>
        Toggle is off
  </label>
</div>
$('.bootstrap-switch').each(function(){
    $this = $(this);
    data_on_label = $this.data('on-label') || '';
    data_off_label = $this.data('off-label') || '';

    $this.bootstrapSwitch({
        onText: data_on_label,
        offText: data_off_label
    });
});