confirm before close modal

Solutions on MaxInterview for confirm before close modal by the best coders in the world

showing results for - "confirm before close modal"
Laura
27 May 2018
1//jQuery and Bootstrap Lib's always comes first
2$(document).ready(function () { //Dom Ready
3    $('.closefirstmodal').click(function () { //Close Button on Form Modal to trigger Warning Modal
4        $('#Warning').modal('show').on('show.bs.modal', function () { //Show Warning Modal and use `show` event listener
5            $('.confirmclosed').click(function () { //Waring Modal Confirm Close Button
6                $('#Warning').modal('hide'); //Hide Warning Modal
7                $('#Form').modal('hide'); //Hide Form Modal
8            });
9        });
10    });
11});
12