Bootstrap 3 Modal: how to check if modal is open or closed using jquery/javascript -
Can someone please tell me how to check the bootstrap 3.0 modal status, whether it is open using jQuery or Javascript or Closed. I use the following code, but when you open a model for a time, it works, otherwise data gives insufficient error.
if ($ ('# addMemberModal'). Data ('bsmodal') .isShown == true) {console.log ("the model is open"); }
You can use jQuery directly like this: < Pre>. $ ('# myModal') is (': visible');
Comments
Post a Comment