javascript - Bootstrap modal window does not close -
i using bootstrap modal in react application . have requirement modal window should not close when clicking on modal backdrop . using
$(".modal").modal("backdrop":"static");
which works fine . in next scenario , want same modal close on clicking on backdrop using following code.
$(".modal").modal("backdrop":true);
but not working .
i tried too
$('#modal').modal('hide');
please provide feasible solution same.
to close bootstrap modal can pass 'hide' option modal method follow
$('#modal').modal('hide');
bootstrap provide events can hook modal functionality, if want fire event when modal has finished being hidden user can use hidden.bs.modal event can read more modal methods , events here in documentation
Comments
Post a Comment