title: echo with sweetalert not working
body: <p>I am trying to echo a alert/notification box. This one is working fine -</p>
  
  <pre><code>echo '&lt;script language="javascript"&gt;';
  echo 'alert("Record successfully added in database")';
  echo '&lt;/script&gt;';
  </code></pre>
  
  <p>But I want to give timing for disappear the box after 2 seconds. I have no idea how to do it. I found through sweetalert it is possible. So I did like this -</p>
  
  <pre><code>echo '&lt;script src="sweetalert/lib/sweet-alert.min.js"&gt;';
  echo '&lt;link rel="stylesheet" type="text/css" href="sweetalert/lib/sweet-alert.css"&gt;';
  echo 'swal({   title: "Record added successfully!",   
                 text: "I will close  in 2 seconds.",   
                  timer: 2000 
         });';
  echo '&lt;/script&gt;';
  </code></pre>
  
  <p>Any help will be greatly appreciated.</p>