title: Load a modal if a session exists is not working
body: <p>I want show a modal if session is exist, I am tried like this but it's not showing</p>
  
  <pre><code>&lt;?php if(isset($_SESSION['Message1'])) { ?&gt;
  &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria- labelledby="myModalLabel" aria-hidden="true"&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" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;
      &lt;h4 class="modal-title" id="myModalLabel"&gt;Welcome...&lt;/h4&gt;
    &lt;/div&gt;
    &lt;div class="modal-body"&gt;
      This is test 
    &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;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
     &lt;/div&gt;
    &lt;/div&gt; 
   &lt;/div&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
    $(window).load(function(){        
    $('#myModal').modal('show');
  }); 
  &lt;/script&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>Thanx in advance</p>