article

Tuesday, July 21, 2015

Launch Bootstrap Modal on page load

Launch Bootstrap Modal on page load JS
<script type="text/javascript">
    $(window).load(function(){
        $('#myModal').modal('show');
    });
</script>
HTML
<div class="modal hide fade" id="myModal">
  <div class="modal-header">
    <a class="close" data-dismiss="modal">×</a>
    <h3>Modal header</h3>
  </div>
  <div class="modal-body">
    <p>One fine body…</p>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn">Close</a>
    <a href="#" class="btn btn-primary">Save changes</a>
  </div>
</div>

Related Post