drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.39k stars 1.63k forks source link

ifChecked handler stops working.... #380

Open m3ldro opened 7 years ago

m3ldro commented 7 years ago

Hello, i've found something strange. I'm using ifChecked to handle the change on my radio button set.

Radio buttons are inside a modal-box and on display block of the modal i call this function

function inizializzaIcheck(tipoCheck,classeRadio) {

    if(typeof(tipoCheck) == 'undefined') {
        tipoCheck = 'minimal';
        classeRadio = '';
    }

    $('input').iCheck({
        tap: true,
        checkboxClass: 'icheckbox_'+tipoCheck,
        radioClass: 'iradio_'+tipoCheck,
        increaseArea: '20%' // optional
    });
}

All seems to working well but.... at a certain point the handler doesn't works anymore.

If i click on the radio... no error, the radio option change properly but the handler not working.

    $('input[name=my_radio]').on('ifChecked', function (event) {
        var data = $(this).val();
        myFunction(data);
    });
Legion112 commented 5 years ago

@m3ldro I got the same did you sole this?

m3ldro commented 5 years ago

@112Legion112 no, i'm still having this problem. :(