user3340300
user3340300

Reputation: 67

How to hide background while throbber/loading is in progress

I am using ajax throbber in my pages.

Throbber is working fine.However,I want to hide background while throbber is in process.

Here are the examples of what am looking for??

https://drupal.org/files/ajax-block-working.png https://drupal.org/files/sexy-throbber.png

Upvotes: 0

Views: 463

Answers (1)

Farhad
Farhad

Reputation: 2003

You should have an div with following css code:

.overlay{background:rgba(0,0,0,0.5);
position:fixed;
z-index:99999;
top:0;
left:0;
}

then in html wrote this:

<div class="overlay" id="ovly"> </div>

and at last in script wrote this :

//when your ajax is start loading
$("#ovly").show();

and remember that in your css there should not be any z-index more than 99999 excepts the loading img property

Upvotes: 1

Related Questions