1$('#myModal').modal('toggle');
2$('#myModal').modal('show');
3$('#myModal').modal('hide');
1$(window).on('shown.bs.modal', function() {
2 $('#code').modal('show');
3 alert('shown');
4});
1<!-- Modal HTML embedded directly into document -->
2<div id="ex1" class="modal">
3 <p>Thanks for clicking. That felt good.</p>
4 <a href="#" rel="modal:close">Close</a>
5</div>
6
7<!-- Link to open the modal -->
8<p><a href="#ex1" rel="modal:open">Open Modal</a></p>