1$(window).on('shown.bs.modal', function() {
2 $('#code').modal('show');
3 alert('shown');
4});
1<div class="modal fade" id="phoneEdit" tabindex="-1" role="dialog" aria-labelledby="phoneEdit" aria-hidden="true">
2 <div class="modal-dialog" role="document">
3 <div class="modal-content">
4 <div class="modal-header center">
5
6 <label class="large-text bold text-align-left">
7 <?= __d('member', 'edit_password'); ?>
8 </label>
9
10 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
11 <span aria-hidden="true">×</span>
12 </button>
13 </div>
14
15 <div class="modal-body">
16 </div>
17 </div>
18 </div>
19</div>
20
21
22
23$("#phoneEdit").on('shown.bs.modal', function(e){
24 console.log('enter here');
25
26 // do anything after the modal open
27 $(".number_six").val("");
28 });
1<!-- Remember to include jQuery :) -->
2<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
3
4<!-- jQuery Modal -->
5<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script>
6<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css" />
7
8Embed modal HTML in document
9Create a link with rel="modal:open" and set the href attribute to the modal's DOM id.
10<!-- Modal HTML embedded directly into document -->
11<div id="ex1" class="modal">
12 <p>Thanks for clicking. That felt good.</p>
13 <a href="#" rel="modal:close">Close</a>
14</div>
15
16<!-- Link to open the modal -->
17<p><a href="#ex1" rel="modal:open">Open Modal</a></p>
1<!-- AJAX response must be wrapped in the modal's root class. -->
2<div class="modal">
3 <p>Second AJAX Example!</p>
4</div>
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>