title: AJAX fade on submit
body: <p>I have a quick question about this fade out div. I use facebox, and after the submit, and it shows an error it'll show this:</p>
  
  <p><a href="http://puu.sh/1uPnF" rel="nofollow noreferrer">http://puu.sh/1uPnF</a></p>
  
  <p>however I want that to fade away, after they've caught that message. On my AJAX handler for the submit form, this is the PHP code:</p>
  
  <pre><code>&lt;?php
  require_once('....');
  
  $form_name = $_GET['form_name'];
  $form_comment = $_GET['form_comment'];
  $date = date('Y-n-j');
  $ip = $_SERVER['REMOTE_ADDR'];
  
  
   if($form_name == '') {
      echo("&lt;div class='alert alert-error-x'&gt;Don't forget to enter a name, as we need to identify who's commenting on this article!&lt;/div&gt;");
  
  } else if($form_comment == '') {
      echo("&lt;div class='alert alert-error-x'&gt;Please do not leave the comment field blank, we want to know what you're saying!&lt;/div&gt;");
  
  } else {
  mysql_query("INSERT INTO comment (id, articleid, name, comment, date, ip) VALUES (NULL,'{$_GET['id']}','{$form_name}','{$form_comment}','{$date}','{$ip}')");
  
      // output comment
      echo "&lt;div class='alert alert-success-x'&gt;Posted by &lt;strong&gt;$form_name&lt;/strong&gt; on     &lt;strong&gt;{$date}&lt;/strong&gt;$form_comment&lt;/div&gt;";
  }
  
  ?&gt;
  </code></pre>
  
  <p>This is where the output of what would be submitted, on the article.php:</p>
  
  <pre><code> &lt;?php
  
  $amount_get = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "'"); $comments = mysql_num_rows($amount_get);
  
  $grab = mysql_query("SELECT * FROM comment WHERE articleid='" . mysql_real_escape_string($_GET['id']) . "'");
  
  if (mysql_num_rows($grab)==0) {
  
      echo "&lt;div class='alert alert-note-x'&gt;Sorry, it looks like their are no comments to be displayed, check back later!&lt;/div&gt;";
  }
  
      while($row = mysql_fetch_array($grab)){
  
      ?&gt;
  
   &lt;div id="new_comment"&gt;&lt;/div&gt;
   &lt;div class="article-comment"&gt;
   Posted by &lt;b&gt;&lt;?php echo $row['name'] ?&gt;&lt;/b&gt; on &lt;b&gt;&lt;?php echo $row['date'] ?&gt;&lt;/b&gt;  
   &lt;br /&gt;  
   &lt;?php echo $row['comment'] ?&gt;
   &lt;/div&gt;
     &lt;?php } ?&gt;         
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now I tried adding the below code in the core.js file, which is located on my site at krissales.com</p>
  
  <pre><code>$(window).bind("load", function() { 
  $('#new_comment').fadeOut(4000);
  });
  </code></pre>
  
  <p>However it did not work. If you want to test the demo, then check it out at: <a href="http://www.krissales.com/#/media/30.This-is-a-new-article-for-Testing" rel="nofollow noreferrer">http://www.krissales.com/#/media/30.This-is-a-new-article-for-Testing</a>!</p>
  
  <p>What is it that I'm doing wrong, please? </p>
  
  <p>Thanks!</p>