Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to close Materialize modal only when user clicks on close btn?

I want to close modal ONLY when user clicks on close button. I know, how to do this in Bootstrap. Could you help with Materialize?

like image 987
Brightest.Sirius Avatar asked Dec 19 '15 15:12

Brightest.Sirius


1 Answers

The leanModal(), openModal(), and closeModal() all failed for me. Things must have changed since then. Instead:

$("#modal1").modal({
    dismissible: false
  });

or even just calling the modal a second time:

$("#modal1").modal();
like image 123
mac Avatar answered Sep 22 '22 07:09

mac