Open on page load
-
I’m trying to get the modal to display on page load, so I can give users feedback on form submissions but it is not working. Is this not supported by your plugin or am I doing something wrong? The modal displays fine if I click the button.
<!-- Button trigger modal --> <br><a class="btn btn-primary btn-lg" href="#myModal1" data-toggle="modal">Launch demo modal</a> <!-- Modal --> <div id="myModal1" class="modal fade" role="dialog" tabindex="-1" > <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button class="close" type="button" data-dismiss="modal">×</button> <h4 class="modal-title">My Title in a Modal Window</h4> </div> <div class="modal-body">This is the body of a modal...</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><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <script> $(document).ready(function(){ // Show the Modal on load $("#myModal1").modal("show"); }); </script>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Open on page load’ is closed to new replies.