$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');
$('#myModal').modal('show');
$(window).on('shown.bs.modal', function() {
$('#code').modal('show');
alert('shown');
});
show Modal:
----------------------------
$('#modal_id').modal('show');
hide and show Modal (toggle):
-----------------------------
$('#modal_id').toggle('modal');
$('#modal_id').modal('show');
$('#my-modal').modal({
show: 'false'
});
<!-- AJAX response must be wrapped in the modal's root class. -->
<div class="modal">
<p>Second AJAX Example!</p>
</div>
.ui-dialog { z-index: 1100 !important ;}
$("#sticky").modal({
escapeClose: false,
clickClose: false,
showClose: false
});
<!-- Modal HTML embedded directly into document -->
<div id="ex1" class="modal">
<p>Thanks for clicking. That felt good.</p>
<a href="#" rel="modal:close">Close</a>
</div>
<!-- Link to open the modal -->
<p><a href="#ex1" rel="modal:open">Open Modal</a></p>
$('#sub-modal').modal({
closeExisting: false
});
Open bootstrap modal by jQuery