How To Handle Radio Event When Icheck-helper Is Used?
I want to handle the radio button on change event. But, as the designer has already used iCheck-helper, the actual radio actions are not performed when the code is run. Below is th
Solution 1:
According to documentation, you can use ifChanged
event like this:
$('#bg-effect').on('ifChanged', function(event){
alert(event.type + ' callback');
});
Solution 2:
I ran throught the same problem,later i found useful fix as has been correctly answered from github forum : read from this thread
The following was a fix:
$('input').on('ifCreated ifClicked ifChanged ifChecked ifUnchecked ifDisabled ifEnabled ifDestroyed check ', function(event){
if(event.type ==="ifChecked"){
$(this).trigger('click');
$('input').iCheck('update');
}
if(event.type ==="ifUnchecked"){
$(this).trigger('click');
$('input').iCheck('update');
}
if(event.type ==="ifDisabled"){
console.log($(this).attr('id')+'dis');
$('input').iCheck('update');
}
}).iCheck({
checkboxClass: 'icheckbox_minimal-green',
radioClass: 'iradio_minimal-green'//increaseArea: '20%'
});
Post a Comment for "How To Handle Radio Event When Icheck-helper Is Used?"