Answers for "js prevent modal to close"

4

javascript modal close

$('#closemodal').click(function() {
    $('#modalwindow').modal('hide');
});
Posted by: Guest on March-08-2020
0

disable close from screen modal popup

<!-- opening with html, the key is the data-backdrop="static" attribute -->
<button data-target="#myModal" data-toggle="modal" data-backdrop="static" data-keyboard="false">
    Launch demo modal
 </button>
 
<script>
//Opening with JS:
$('#myModal').modal({backdrop: 'static', keyboard: false})  
</script>
Posted by: Guest on December-01-2020

Code answers related to "js prevent modal to close"

Browse Popular Code Answers by Language