drgullin / icheck

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

Calling iCheck in event method #75

Closed rafalkrawczyk closed 10 years ago

rafalkrawczyk commented 11 years ago

Hi,

I've found small problem. I have two radio buttons already initialized with iCheck. On the 'ifClicked' event I need to create another checkboxes on the page. Calling iCheck in the event method causes that those radio buttons stop working. It happens beacause in 'operate' function variable 'active' is being changed while executing iCheck.

Anyway, solution is very simple. In operate function you should change:

var node = input[0];
  state..

to:

var node = input[0],
  state..

If you'll do that active variable won't change after calling iCheck and everything will work fine.

drgullin commented 10 years ago

Thanks @rafalkrawczyk