I got a weird situation when the iCheck box works fine without VueJS binding. However, when I check on a box, it doesn't link to Vue at all.
HTML code:
<div class="box box-success box-solid" id="root">
<div class="box-header with-border">
<h3 class="box-title">Health</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body" style="display: block;">
<div class="form-group col-md-12">
<input type="checkbox" id="green" value="Green" v-model="checkedHealths">
<label for="green">Green</label>
</div>
<div class="form-group col-md-12">
<input type="checkbox" id="red" value="Red" v-model="checkedHealths">
<label for="red">Red</label>
</div>
<div class="form-group col-md-12">
<input type="checkbox" id="yellow" value="Yellow" v-model="checkedHealths">
<label for="yellow">Yellow</label>
</div>
</div>
<!-- /.box-body -->
<pre>{{$data | json}}</pre>
</div>
JS Code:
new Vue ({
el: "#root",
data: {
checkedHealths: ['Green']
},
mounted: function(){
jQuery('input').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
increaseArea: '20%' // optional
});
}
})
I can use the check box, and doesn't seem like it did not fire the event that can catch new value.
You can check my sample code from: http://codepen.io/techcater/pen/mmdLOX
Thanks,