can anyone spread some light?
Why this .toggle() is breaking the checked/unchecked state of a checkbox?
$('#checkbox').toggle(function(){},function(){});
when I think, it’s just doing nothing.
crazy demo
this was taken from comments of this answer
toggle()called with two callbacks adds aclickevent on the targeted element. The event will execute the first callback on even clicks; the second one on odd ones.Also, and this is why it changes the behaviour, according to the manual: