• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window Modal does not work

#11
(06-10-2019, 06:36 PM)hamanalda Wrote: Is the modal window called?
$('#myModal').on('show.bs.modal', function (event) {
     console.log('myModal show~~~~~~~');
})
$('#myModal').modal();

If the call does not work 
<script>
$(document).ready(function(){
    function on_ready() {
        $('#myModal').on('show.bs.modal', function (event) {
            console.log('myModal show~~~~~~~');
        })
        $('#myModal').modal();
    }
    on_ready();
});
</script>

If called, Test it with the following code
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Modal title</h4>
      </div>
      <div class="modal-body">
        ...
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
https://getbootstrap.com/docs/3.4/javascript/#modals

Good luck~

Hello. Is it for me to test this code first? Without the <script> tag?
How to test this?

Code:
Is the modal window called?
$('#myModal').on('show.bs.modal', function (event) {
    console.log('myModal show~~~~~~~');
})
$('#myModal').modal();


This second part is to be used along with html bootstrap below, ok?
Sorry, but I do not understand: the first code is for me to test how?
The first and second scrip JS are the same, correct?
Reply


Messages In This Thread
Window Modal does not work - by RRIOS - 06-08-2019, 10:53 AM
RE: Window Modal does not work - by php_rocs - 06-08-2019, 08:42 PM
RE: Window Modal does not work - by RRIOS - 06-09-2019, 06:53 AM
RE: Window Modal does not work - by InsiteFX - 06-09-2019, 03:05 AM
RE: Window Modal does not work - by RRIOS - 06-09-2019, 06:52 AM
RE: Window Modal does not work - by PaulD - 06-09-2019, 08:22 AM
RE: Window Modal does not work - by RRIOS - 06-10-2019, 06:29 AM
RE: Window Modal does not work - by php_rocs - 06-10-2019, 08:23 AM
RE: Window Modal does not work - by RRIOS - 06-10-2019, 02:10 PM
RE: Window Modal does not work - by hamanalda - 06-10-2019, 06:36 PM
RE: Window Modal does not work - by RRIOS - 06-11-2019, 07:25 AM
RE: Window Modal does not work - by hamanalda - 06-11-2019, 07:48 PM
RE: Window Modal does not work - by RRIOS - 06-11-2019, 08:00 AM
RE: Window Modal does not work - by RRIOS - 06-11-2019, 08:14 AM
RE: Window Modal does not work - by InsiteFX - 06-16-2019, 04:45 AM
RE: Window Modal does not work - by Piotr - 06-16-2019, 07:43 AM
RE: Window Modal does not work - by InsiteFX - 06-17-2019, 08:35 AM
RE: Window Modal does not work - by RRIOS - 06-17-2019, 12:50 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.