drgullin / icheck

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

iCheck replacement duplicated after AJAX call on page #83

Closed beneklisefski closed 10 years ago

beneklisefski commented 11 years ago

I'm using iCheck for simple checkbox replacement in a web app. The developers working on the site have reported that after an AJAX call on the page to load external content into a modal window, the iCheck checkboxes on that page get duplicated. After opening a number of these modal windows there is a big stack of checkboxes one on top of the other, as seen in the attached screenshot. Any idea why this would happen? screenshot_101413_031235_pm

drgullin commented 11 years ago

It seems that some script replaces input in this modal and then iCheck is called again.

Actually, iCheck saves some data inside the nodes and checks it once re-init is requested. Something erases that data in your modal.