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

  • SEARCH
  • Home
  • 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 8710531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:38:58+00:00 2026-06-13T04:38:58+00:00

I am having a trouble display the cursor wait when I run a lengthy

  • 0

I am having a trouble display the cursor wait when I run a lengthy jQuery operation. What I try is

function foo(){
   jQuery('body').css('cursor', 'wait');

   //lengthy jQuery sort/DOM manipulation

   jQuery('body').css('cursor', 'default');
}

what I have observe so far is that, it looks to me like when onclick, invoke this function, it take about 6 seconds (time it takes to operate the sort), then I see all the changes at the end. This make sense since I am still within the same JQuery call, but is there a way to force the cursor change to show to wait, then after the sort operation, and change the cursor back to default once it is done.

NOTE: The length operation is not an ajax call.

  • 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-13T04:38:59+00:00Added an answer on June 13, 2026 at 4:38 am

    This seems good but the problem is that your browser “freezes” when starting to run foo and unfreezes at the end so you can’t notice the cursor change…

    Try something similar to what you have but using a timeout…

    function foo(){
       jQuery('body').css('cursor', 'wait');
       window.setTimeout(someLengthy,1);
    }
    
    function someLength(){
       //lengthy jQuery sort/DOM manipulation
       jQuery('body').css('cursor', 'default');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble properly formatting CSS to display in IE the way I
I'm having trouble setting up my css to display my page correctly. I want
I'm having trouble getting chrome to display my custom cursor correctly but it seems
I'm having trouble to display data after form submition using JS and AJAX here
Im having trouble getting my JTable that im using to display either check boxes
Having trouble with recursive methods in c#. When compiled it should just display the
I'm having trouble getting Japanese text to display properly on a website compiled using
I'm having trouble getting any information to display from this query. Anyone know where
I am having trouble creating a layout for a dialog I want to display
I am having trouble efficiently selecting the information I need to display. Hopefully someone

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.