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

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -