title: Slow down a JQuery ajax call?
body: <p>i am working on an ajax login system for jquery and everything seems to work fine, my question is how am i able to slow down the call or pause for x seconds before the success to show a gif loading image?</p>
  
  <p>code:</p>
  
  <pre><code>$('.AJAX').on('submit', function(event) 
  {
      event.stopPropagation();
      event.preventDefault();
  
      var This = $(this);
      var Data = {};
  
      This.find('[name]').each(function(Index, Value) {
  
      var This = $(this),
      Name = This.attr('name'),
      Value = This.val();
  
      Data[Name] = Value
  });
  
  $.ajaxSetup(
  {
      beforeSend:function()
      {
          $('.Msg').html('&lt;img src="../Assets/Pictures/Loading.gif" /&gt;');
      },
      complete:function()
      {
          $('.Msg').find('img').remove();
      }
  });
  
  $.ajax(
  {
      url:'Log.php',
      type:'POST',
      data:Data,
      success:function(Data)
      {
          $('.Msg').html('&lt;span style="color:red"&gt;' + Data + '&lt;/span&gt;').hide().fadeIn('fast');
      });
  
      return false;
  });
  </code></pre>