How to Launch Bootstrap Modal on page load

You can create bootstrap modal on page load only you have to write some script which is given below
Click Here To Live check
<html lang="en"> <head> <title>Auto Loading Bootstrap Modal on Page Load</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"></link> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script> $(document).ready(function(){ $("#myModal").modal('show'); }); </script> </head> <body> <br /><br /> <div class="modal fade" id="myModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button aria-hidden="true" class="close" data-dismiss="modal" type="button">&#215;</button> <h4 class="modal-title text-center"> How to launch Bootstrap modal on page load</h4> </div> <div class="modal-body"> <form> <div class="form-group"> <input class="form-control" placeholder="Name" type="text" /> </div> <div class="form-group"> <input class="form-control" placeholder="Email Address" type="email" /> </div> <div class="form-group"> <input class="form-control" placeholder="***************" type="password" /> </div> <button class="btn btn-primary btn-block" type="submit">Subscribe</button> </form> </div> </div> </div> </div> </body> </html>

agyanadda

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 $type={blogger}:

Post a Comment