How to handle a radio event when using iCheck-helper?

I want to handle a switch on a change event. But, since the developer has already used iCheck-helper, the actual radio actions are not performed when the code runs.

Below is the code

<div class="radio-wrap">
   <input type="radio" id="bg-effect" value="full" />Full Image
</div>

When we run the code and test the code in chrome, the generated HTML looks like this.

<div class="radio-wrap">
  <div class="iradio_minimal-grey checked"><input type="radio" id="bg-effect" value="full" checked="" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>Full Image
</div>

To commit the selected value, I want to handle the change event for this switch.

+4
source share
1 answer

According to the documentation, you can use the event ifChangedas follows:

$('#bg-effect').on('ifChanged', function(event){
    alert(event.type + ' callback');
});
+13
source

All Articles