.on ('click') event, does not work in input containing date-md-icheck

1

Hello, in my function there is the .onClick event that should activate when checking checkbox , but when I use data-md-icheck it is ignored by the function.

<input type="checkbox" data-md-icheck class="ts_checkbox"/>

Event:

$(document).on('click', 'input[type="checkbox"]', function () { 
    $this.click = $(this);
    $this.get();
});
    
asked by anonymous 25.08.2016 / 19:25

2 answers

0

Documentation link

I used the command:

$ ('input') on ('ifChecked', function (event) {   alert (event.type + 'callback'); });

    
30.08.2016 / 20:08
-1

For me the event ifChanged works fine.

$(document).ready(function(){
       var callbacks_list = $('.demo-callbacks ul');
            $('.demo-list input').on('ifCreated ifClicked ifChanged ifChecked ifUnchecked ifDisabled ifEnabled ifDestroyed check', function(event){
                $('#'+this.id+':checkbox').attr('checked', function(idx, oldAttr) {
                   return !oldAttr;
                }); //this manipulates checked state of checkbox
            }).iCheck({
              checkboxClass: 'icheckbox_square-blue',
              radioClass: 'iradio_square-blue',
              increaseArea: '20%'
            });
          });
    
19.04.2017 / 19:49