Bootstraps ICheck-Helper does not trigger on changed event

checkbox, jquery, twitter-bootstrap

Solution

Use ifChanged or ifChecked mentioned in the documentation (web archive version)

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

Problem

I have this Jquery code to be updating checkboxes base on whether a checkbox has been checked. However, This does not fire. Code ``` $('body').on('change', '.territory', function () { var PK = $(this).find('input:checkbox:first').val(); var PKStr = '.parent' + PK; console.log('change!'); }); $('body').on('change', '.iCheck-helper', function () { //var PK = $(this).find('input:checkbox:first').val(); //var PKStr = '.parent' + PK; console.log('change!'); }); <div class="row"> <div class="col-md-12 col-lg-12"> <label class="control-label"> Selected Territories </label> </div> @for (int c = 0; c < 2; ++c) { int Count = 0; <div class="col-md-6 col-lg-6"> @foreach (var ter in Infobase.MMS.Models.ComboBoxValues.GetTerritoryRights(0)) { if (Count % 2 == c) { <label> <input type="checkbox" class="territory" value="@ter.Key"> &nbsp;@ter.Value </label> } Count++; } </div> } </div> ``` I've tried binding to the click function and change function on iCheckbox-Helper as well as directly to the checkboxes. However neither seem to work. Everything does work fine when I dont add in the Icheck.js script. Does anybody know how to hook into on changed event from bootstraps Icheckhelper class?

Original source