Simple ajax waiting layout in pure CSS

css:

#waiting {
top: 0;
left: 0;
display: none;
position: fixed;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.5) url(‘../default-loader.gif’) no-repeat center center ;
}

 

html:

<body>

..

</body>

js:

$(‘#waiting’).show();

or

$(‘#waiting’).hide();

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s