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 9312007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:31:24+00:00 2026-06-19T01:31:24+00:00

I’m using jQuery 1.6.2 and I have to disable all elements on a page

  • 0

I’m using jQuery 1.6.2 and I have to disable all elements on a page with forms, selects, and links while displaying a please wait animation.

I found a free animation at Ajaxload and was using $('.gif').show(); to display it, waiting until some javascript functions complete and then calling $('.gif').hide();

However, I ran into something I wasn’t expecting. When the user selects a new item in the dropdown the loading gif animation displays, but shortly thereafter, in a nested javascript functions associated with the dropdown, it calls for a page refresh with new data from a database call and removes my animation before I can call the hide function.

So my question is, is it possible to display an animation that will display in the jsp and then continue until the reload is complete?

I was using something like this to disable the link click events:

 $("a").click(function(event) {
   // add some conditional logic here if animation is running then
    event.preventDefault(); ...

So, is there a better way to globally disable all the elements on the page, preventing a click event or a change event on the select dropdown?

Aftermath:

I used the suggestion of Archer for the background div, the answer from Jai, along with this blog article: jQuery page loading delay, this article on using a modal window with an animation and came up with a custom solution that fit exactly what I needed.

Thanks for the help from everyone, it’s greatly appreciated!

  • 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-19T01:31:25+00:00Added an answer on June 19, 2026 at 1:31 am

    May be using doc ready and window load together this way:

    $(function(){
       $('.gif').show();
       $(window).load(function(){
          $('.gif').hide();
          $('#wrapper').show();
       });
    });
    

    initially the wrapper div needs to be hidden, when window fully gets loaded show the wrapper and hide the gif.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a text area in my form which accepts all possible characters from
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I am reading a book about Javascript and jQuery and using one of the
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am using JSon response to parse title,date content and thumbnail images and place
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.