Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8976301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:05:58+00:00 2026-06-15T19:05:58+00:00

Is it posible to setTimeout on beforeSend so ajax spinner will spin 4 seconds

  • 0

Is it posible to setTimeout on beforeSend so ajax spinner will spin 4 seconds ? Or I have to use differed function to do that?

The reason I wanna do that is because some times for is processing so fast that user cant even see the effect with ajax spinner.

var v = $("#contact-form").validate({
 submitHandler: function(form) {
   $(form).ajaxSubmit({
   beforeSend: function() {
    $('.submit-btn button').addClass('loading');
   },
    url: 'send-mail.php',
    success: function() {
    $('.submit-btn button').addClass('message-sent');
    },
   complete: function() {
    $('.submit-btn button').removeClass('loading').text('Send');   }
   });     
   v.resetForm();
 }
})
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:06:00+00:00Added an answer on June 15, 2026 at 7:06 pm

    It is possible using an animation queue. However this is not recommended. I mean you want to make a fast user interface, so why would I as a user be forced to wait 4 seconds if the server interaction has finished much faster?

    The graphics side of it may look tempting, but from a UX point of view, just leave it as it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Is it posible to use ajax respone outside of it? I've created
Possible Duplicate: function in setInterval() executes without delay I am trying to use setTimeOut
Currently i have this code setTimeout(function() { $('#hideMsg').fadeOut('fast'); }, 2000); is it possible for
Possible Duplicate: How to Use setTimeout in a for…loop calling setTimeout with a for
Question Is it posible to have the Validation.Validate() method of the Validation Application Block
Using setTimeout() it is possible to launch a function at a specified time: setTimeout(function,
Possible Duplicate: Is there ever a good reason to pass a string to setTimeout?
So, in javascript since it's event-driven by its nature it seems that setTimeout doesn't
http://jsfiddle.net/f4hmL/235/ function showData() { alert(boop!); } function method1() { var dfd = $.Deferred(); setTimeout(dfd.resolve(),
When using Firebug or some of the bookmarklets: javascript:(function(){var a=document.createElement(script);a.setAttribute(src,http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js);if(typeof jQuery==undefined){document.getElementsByTagName(head)[0].appendChild(a)}(function(){if(typeof jQuery==undefined){setTimeout(arguments.callee,100)}else{jQuery(*).one(click,function(d){jQuery(this)[0].scrollIntoView();for(var e=,c=jQuery(this)[0];c&&c.nodeType==1;c=c.parentNode){var b=jQuery(c.parentNode).children(c.tagName).index(c)+1;b>1?(b=[+b+]):(b=);e=/+c.tagName.toLowerCase()+b+e}window.location.hash=#xpath:+e;prompt('Twoje

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.