Reputation: 1236
I have a problem disabling an input field when a checkbox is checked with a plugin called iCheck (http://fronteed.com/iCheck/).
Note: my code is working when the iCheck plugin is not used.
Working example without iCheck: http://jsbin.com/gusewu/1/
NOT working example when iCheck is included: http://jsbin.com/ludiqi/1/
Any help on debugging this would be appreciated. I've been on this for 2 days now. :-/
Upvotes: 0
Views: 668
Reputation: 193301
You should make use of ifChanged
custom event:
$('input').iCheck({
checkboxClass: 'icheckbox_flat-blue',
radioClass: 'iradio_flat'
})
.on('ifChanged', function() {
$('#upload_image:input').prop('disabled', this.checked);
})
.trigger('ifChanged');
Upvotes: 1
Reputation: 12045
You're doing it wrong... iCheck overrided all those events and has own ones, all listed here
$('input').on('ifChecked', function(event){
alert(event.type + ' callback');
});
Upvotes: 1