title: Auto load alert using Sweetalert.js
body: <p>Im using a plugin called <strong>SweetAlert</strong>. But on the examples provided, the alert can only be triggered when a button is click like this:</p>
  
  <pre><code>document.querySelector('.msg').onclick = function(){
      swal("Here's a message !");
  };
  </code></pre>
  
  <p>But I want to apply this plugin on my login page so that when the username and password is accepted, the alert must be triggered directly, not on onlick event. Can anyone already used this plugin? Please help. Thanks.</p>