title: modal popup on pageload with pure javascript
body: <p>I would like to know how to create a modal popup without using jquery or boostrap but using javscript. 
  Modal popup should show only on page load for 30 sec and close automatically.
  have tried using jquery and bootstrap but need to create in javascript </p>
  
  <pre><code>&lt;script&gt;
       $(document).ready(function () {
       $('.modal').modal('show');
        });
    &lt;/script&gt;
  
   &lt;div id="myModal" class="modal fade" role="dialog"&gt;
        &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
              &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times; 
              &lt;/button&gt;
              &lt;h4 class="modal-title"&gt;Load Bootstrap modal on page launch&lt;/h4&gt;
            &lt;/div&gt;
          &lt;div class="modal-body"&gt;
            &lt;p&gt;
             This is a simple Demo to launch a model on page load.
            &lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="modal-footer"&gt;
              &lt;button type="button" class="btn btn-default" data- 
             dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>