drgullin / icheck

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

iCheck with twitter bootstrap modal doesn't work #70

Closed jprubio closed 10 years ago

jprubio commented 11 years ago

When i use iCheck alone it works fine but inside a modal dialog box i run into problems. It seems to be a mistake about the boundaries of the checkbox.

tab commented 11 years ago

You should initialize iCheck after modal form are added into DOM:

$('#myModal').on('shown', function () {
  // initialize iCheck
})

http://getbootstrap.com/javascript/#modals

ghost commented 9 years ago

Sorry I know this was closed a while back, however I've got the same issue.

I have re-initialised iCheck when the bootstrap modal is shown. Hovering over and clicking on the label works fine, however hovering over and clicking on the checkbox itself doesn't work when it's in a bootstrap modal.

The same code works fine outside of the modal. I'm using 1.0.2.

Thanks, Andy