Launch Bootstrap Modal on Page Load

Oftentimes we are caught in the web of showing up an update, advertising a product, and even passing out an important update on our website and/or a webpage upon visit.

Below is an example of basic HTML and Javascript codes that can get the job done with no hassle.


<script type="text/javascript">
    $(window).on('load', function() {


<div class="modal hide fade" id="myModal">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">×</a>
        <h3>Modal header</h3>
    <div class="modal-body">
        <p>One fine body…</p>
    <div class="modal-footer">
        <a href="#" class="btn">Close</a>
        <a href="#" class="btn btn-primary">Save changes</a>



Leave a Reply

Your email address will not be published. Required fields are marked *