All Projects → amazeui → switch

amazeui / switch

Licence: other
Turn checkboxes and radio buttons in toggle switches. Forked from Bootstrap Switch.

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Amaze UI Switch


checkboxradio 转换为按钮开关。

项目源自 Bootstrap Switch,只是将样式调整为 Amaze UI 风格,没有修改 JS 源码。

使用说明:

  1. 获取 Amaze UI Switch:
  1. 在 Amaze UI 样式之后引入 Switch 样式:

Amaze UI Switch 依赖 Amaze UI 样式。

<link rel="stylesheet" href="path/to/amazeui.min.css"/>
<link rel="stylesheet" href="path/to/amazeui.switch.css"/>
  1. 在 jQuery 之后引入 Switch 插件:
<script src="path/to/jquery.min.js"></script>
<script src="path/to/amazeui.switch.min.js"></script>
  1. 初始化 Switch:
$(function() {
  $('[name="my-checkbox"]').bootstrapSwitch();
});

可以监听到 jQuery Ready 事件的 DOM 也可以使用 data-am-switch 钩子自动初始化:

<input type="checkbox" data-am-switch />
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].