I am showing a bootstrap modal with
var initobj = {keyboard: someBoolean, backdrop: someBoolean};
$("#myDialog").modal(initobj, "show");
and that will make the dialog non dismissable if someBoolean
is false
.
However, if I am showing the dialog again, changing someBoolean
from true
to false
or false
to true
, it seems like both keyboard and backdrop is remembered from the first call so the behavior will not change.
If I were showing the dialog as non dismissable, it will always show as non dismissable until I refresh the page.
If I were showing the dialog as dismissable, it will aways be dismissable until I refresh the page.
How can I show a dialog the second time with new parameters?
As a sidenote I was also trying
$("#myDialog").removeClass("in").removeClass("show").modal(initobj, "show");
without any effect.