网站首页技术博客
一款bootstrap开关控件推荐,bootstrap-switch
摘要近期一个bootstrap项目需要用到一个开关控件来代替难看的checkbox选框,最终寻得bootstrap-switch
近期一个bootstrap项目需要用到一个开关控件来代替难看的checkbox选框,最终寻得bootstrap-switch
效果:
获取:
插件官网:http://www.bootstrap-switch.org/
用法:
Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript.
[...] [...]
Add your checkbox.
Initialize Bootstrap Switch.
$("[name='my-checkbox']").bootstrapSwitch();
Enjoy.
添加触发时间:
$('input[name="my-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) { console.log(this); // DOM element console.log(event); // jQuery event console.log(state); // true | false});
上一篇:Yii安装提示
下一篇:GII生成代码进行分页
相关文章
- Access denied; you need (at least one of) the SUPER privilege(s) for this operatio
- rm: cannot remove `file': Operation not permitted解决方法 chattr命令详解
- easywechat报错:Failed to cache access token
- chrome模拟微信浏览器的user agent
- jQuery打印插件jqprint
- 实现页面图片的延时异步加载
- 微信小程序登录流程
- mysql General error: 1267 Illegal mix of collations错误
- 基于general_log的mysql日志追踪
- linux nvm 安装及使用
- nginx 负载均衡服务器的简单配置
- 深入理解Mysql事务的隔离性
- laydate组件增加自定义按钮
- 一个多进程管理类
- 一款bootstrap开关控件推荐,bootstrap-switch
- Layer与DatetimePicker层叠顺寻Z-index冲突解决方案
- 常见HTTP错误代码大全
- 添加woff MIME类型
- web开发经验——富头像上传编辑器的使用——fullavatareditor
- bootstrap table分页后事件失效