网站首页技术博客
一款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 安装及使用
- LNMP安装及基本linux命令
- linux下编译安装php7.1.8
- post/get请求接口函数
- supervisor unix:///tmp/supervisor.sock no such file
- 小程序 偶发 Illegal Buffer报错,encryptedData解密失败
- tp5(think-queue)消息队列+supervisor进程管理实现队列常驻进程
- localhost主机名导致微信公众号请求url超时
- MVCC多版本并发控制
- php的几个经典排序算法及时间复杂度和耗时
- ThinkPHP3.2.3连接SQLServer2000