title: Displaying message on Ajax success
body: <p>I have the following piece of javascript which passes data to my database and then returns a success message.</p>
  
  <p>At the moment on success the button fades out and hides perfectly as it should, but the success message doesn't display.</p>
  
  <pre><code>$(document).ready(function () {
      $('form.user_status').submit(function () {
          var userna = $(this).find("[name='userna']").val();
          var joborder_id = $(this).find("[name='joborder_id']").val();
          var user_email = $(this).find("[name='user_email']").val();
          var app_status = $(this).find("[name='app_status']").val();
          // ...
          $.ajax({
              type: "POST",
              url: "user_status.php",
              data: {
                  userna: userna,
                  joborder_id: joborder_id,
                  user_email: user_email,
                  app_status: app_status
              },
              success: function () {
                  $('form.user_status').hide(function () {
                      $('div.success').fadeOut();
                  });
                  success = 'Status changed';
              }
          });
          return false;
      });
  });
  </code></pre>
  
  <p>the html where the success message should be dsplayed</p>
  
  <pre><code>&lt;div class="success" style="display: none;"&gt;&lt;/div&gt;
  </code></pre>