First, I open my modal using this:
$('#myModal').modal('show');
Then, in another situation, I need that this same modal does not close when pressing ESC/clicking outside, so I use this:
$('#myModal').modal({
backdrop: 'static',
keyboard: false
})
But once I open my modal by the first method, the second one doesn't work. Any hints?
How can I force backdrop
value switch to work?