Check box selection in Modal pop up

By | February 2, 2017

Below code will help you in the followin scenarios

#In a model popup bydefault 10 checkbox are that two are selected.
#if you select all checkbox and close the popup
#again open the popup this time pop up with all checkbox selected instead of selecting 2 checkbox

while clicking on the close and show popup again will work using the below code.

  • Instead of

    Its always best to go with

    As, the modal close can happen with clicking outside modal (unless backdrop is static and keyboard false), or header close button click, the first solution won’t work always, where later will. 🙂