public/js/plugins/iCheck/icheck.js
function on(input, state, keep) {
    var node = input[0],
      parent = input.parent(),
      checked = state == _checked,
      indeterminate = state == _indeterminate,
      disabled = state == _disabled,
      callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
      regular = option(input, callback + capitalize(node[_type])),
      specific = option(input, state + capitalize(node[_type]));

    // Prevent unnecessary actions
    if (node[state] !== true) {

      // Toggle assigned radio buttons
      if (!keep && state == _checked && node[_type] == _radio && node.name) {
        var form = input.closest('form'),
          inputs = 'input[name="' + node.name + '"]';

        inputs = form.length ? form.find(inputs) : $(inputs);

        inputs.each(function() {
          if (this !== node && $(this).data(_iCheck)) {
            off($(this), state);
          };
        });
      };

      // Indeterminate state
      if (indeterminate) {

        // Add indeterminate state
        node[state] = true;

        // Remove checked state
        if (node[_checked]) {
          off(input, _checked, 'force');
        };

      // Checked or disabled state
      } else {

        // Add checked or disabled state
        if (!keep) {
          node[state] = true;
        };

        // Remove indeterminate state
        if (checked && node[_indeterminate]) {
          off(input, _indeterminate, false);
        };
      };

      // Trigger callbacks
      callbacks(input, checked, state, keep);
    };

    // Add proper cursor
    if (node[_disabled] && !!option(input, _cursor, true)) {
      parent.find('.' + _iCheckHelper).css(_cursor, 'default');
    };

    // Add state class
    parent[_add](specific || option(input, state) || '');

    // Set ARIA attribute
    disabled ? parent.attr('aria-disabled', 'true') : parent.attr('aria-checked', indeterminate ? 'mixed' : 'true');

    // Remove regular state class
    parent[_remove](regular || option(input, callback) || '');
  }
function on(input, state, keep) {
    var node = input[0],
      parent = input.parent(),
      checked = state == _checked,
      indeterminate = state == _indeterminate,
      disabled = state == _disabled,
      callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
      regular = option(input, callback + capitalize(node[_type])),
      specific = option(input, state + capitalize(node[_type]));

    // Prevent unnecessary actions
    if (node[state] !== true) {

      // Toggle assigned radio buttons
      if (!keep && state == _checked && node[_type] == _radio && node.name) {
        var form = input.closest('form'),
          inputs = 'input[name="' + node.name + '"]';

        inputs = form.length ? form.find(inputs) : $(inputs);

        inputs.each(function() {
          if (this !== node && $(this).data(_iCheck)) {
            off($(this), state);
          };
        });
      };

      // Indeterminate state
      if (indeterminate) {

        // Add indeterminate state
        node[state] = true;

        // Remove checked state
        if (node[_checked]) {
          off(input, _checked, 'force');
        };

      // Checked or disabled state
      } else {

        // Add checked or disabled state
        if (!keep) {
          node[state] = true;
        };

        // Remove indeterminate state
        if (checked && node[_indeterminate]) {
          off(input, _indeterminate, false);
        };
      };

      // Trigger callbacks
      callbacks(input, checked, state, keep);
    };

    // Add proper cursor
    if (node[_disabled] && !!option(input, _cursor, true)) {
      parent.find('.' + _iCheckHelper).css(_cursor, 'default');
    };

    // Add state class
    parent[_add](specific || option(input, state) || '');

    // Set ARIA attribute
    disabled ? parent.attr('aria-disabled', 'true') : parent.attr('aria-checked', indeterminate ? 'mixed' : 'true');

    // Remove regular state class
    parent[_remove](regular || option(input, callback) || '');
  }
function on ( input , state , keep ) { var node = input [ 0 ] , parent = input . parent ( ) , checked = state == _checked , indeterminate = state == _indeterminate , disabled = state == _disabled , callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled' , regular = option ( input , callback + capitalize ( node [ _type ] ) ) , specific = option ( input , state + capitalize ( node [ _type ] ) ) ; // Prevent unnecessary actions if ( node [ state ] !== true ) { // Toggle assigned radio buttons if ( ! keep && state == _checked && node [ _type ] == _radio && node . name ) { var form = input . closest ( 'form' ) , inputs = 'input[name="' + node . name + '"]' ; inputs = form . length ? form . find ( inputs ) : $ ( inputs ) ; inputs . each ( function ( ) { if ( this !== node && $ ( this ) . data ( _iCheck ) ) { off ( $ ( this ) , state ) ; } ; } ) ; } ; // Indeterminate state if ( indeterminate ) { // Add indeterminate state node [ state ] = true ; // Remove checked state if ( node [ _checked ] ) { off ( input , _checked , 'force' ) ; } ; // Checked or disabled state } else { // Add checked or disabled state if ( ! keep ) { node [ state ] = true ; } ; // Remove indeterminate state if ( checked && node [ _indeterminate ] ) { off ( input , _indeterminate , false ) ; } ; } ; // Trigger callbacks callbacks ( input , checked , state , keep ) ; } ; // Add proper cursor if ( node [ _disabled ] && ! ! option ( input , _cursor , true ) ) { parent . find ( '.' + _iCheckHelper ) . css ( _cursor , 'default' ) ; } ; // Add state class parent [ _add ] ( specific || option ( input , state ) || '' ) ; // Set ARIA attribute disabled ? parent . attr ( 'aria-disabled' , 'true' ) : parent . attr ( 'aria-checked' , indeterminate ? 'mixed' : 'true' ) ; // Remove regular state class parent [ _remove ] ( regular || option ( input , callback ) || '' ) ; }
Add checked, disabled or indeterminate state
Add checked disabled or indeterminate state