drgullin / icheck

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

iCheck 2.0 does not work when loaded via ajax (jquery) #264

Open marcing opened 9 years ago

marcing commented 9 years ago

Error message: parsererror "TypeError: (intermediate value).innerHTML is undefined"

Reason is this line: data = (frameData.body || frameData.getElementsByTagName('body')[0]).innerHTML;

My guess is that body does not exist in ajax reply, which is often the case.

damhonglinh commented 9 years ago

I also encountered this issue. I don't know what this code does so my solution is to set the icheck option autoAjax to false so these converter codes will be skipped.

And of course, this solution only works if the option autoAjax is not signification for you. If you need to have the option autoAjax true then I don't know what to do.