$('input').on('ifChanged', function(event){ //ifCreated 事件应该在插件初始化之前绑定
changeType();
});
//js中代码:
$('input[type="radio"]').each(function(){
var self = $(this),
label = self.next(),
label_text = label.text();
label.remove();
self.iCheck({
checkboxClass: 'icheckbox_line-orange',
radioClass: 'iradio_line-orange',
insert: '<div class="icheck_line-icon"></div>' + label_text
});
});
//html代码:
<link href="/static/css/line/orange.css" rel="stylesheet">
<script src="/static/produce/js/icheck.min.js" type="text/javascript"></script>
<div class="col-sm-3" >
<div style="width: 40%;float: left" >
<input type="radio" name="iCheck" id="activity" checked="checked"><label>单日限额</label>
</div>
<div style="width: 40%;float: right" >
<input type="radio" name="iCheck"><label>总量限额</label></div>
</div>
css下载地址:https://github.com/gityuting/icheck.git