title: How I can open a materialize modal when a window is ready?
body: <p>I want to open a modal window when the user be in a window, I mean, open a modal without a trigger button, I have this example.</p>
  
  <pre><code>&lt;button data-target="modal1" class="btn modal-trigger" id="btn-1"&gt;Modal&lt;/button&gt;
  &lt;div id="modal1" class="modal modal-fixed-footer"&gt;
  &lt;div class="modal-content"&gt;
    &lt;h4&gt;Modal Header&lt;/h4&gt;
    &lt;p&gt;A bunch of text&lt;/p&gt;
  &lt;/div&gt;
  &lt;div class="modal-footer"&gt;
    &lt;a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat "&gt;Agree&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  It works if I click on the trigger button, but I don't want a click.
  I use this code when the window is ready:</p>
  
  <pre><code>$(function()
  {
      function checkCode()
      {
          $("#btn-1").click();
      }
  });
  </code></pre>
  
  <p>This automatically push the button and make the effect that modal is auto opened, but I don't want to do this.</p>