0

I'm trying to use Bootstrap-Switch to toggle my checkboxes. It works fine on a normal page, or a modal thats pre-loaded into the page.

However, if I load the modal from a remote page (a href=something.html) the toggle does not work/display. Apparently it loads once but doesn't reload after the modal is opened.

I tried

$("#myModal").on("shown.bs.modal",function(){
      $(".checkbox").bootstrapSwitch();
}); 

But to no avail.

I've tried added the JS code directly to the code being pulled from the Modal as well but it didn't work. It worked on the remote page when loaded directly, but not through the Modal.

I'm a novice JS guy so this may be a trivial fix. Basically need to know how to call bootstrapSwitch() after the modal is loaded.

Thanks!

Robert Guice
  • 609
  • 1
  • 5
  • 12

1 Answers1

0

Just realized I had the shown.bs.modal called 2x for different things. When I combined, it fixed it. Bah, 30 minutes down the drain!

Robert Guice
  • 609
  • 1
  • 5
  • 12