An easy way to create Loading Bar!
“People count up the faults of those who keep them waiting”
Seems like I kept them busy decoding this loading bar ![]()
Recently, while browsing I landed on a page on StackOverflow.com where people were discussing about how I implemented this loading bar on CSSJockey.com. I could sense a lot of confusion in the discussion so thought I would take the mystery out as I love to share best practices. Here’s how you can create a loading bar in few steps..
Things You’ll Need
- A nice loading image: If you are good in creating animated GIF images that’s nice, otherwise you can create a loading image with this cool Ajax Loading Gif Generator.
- jQuery: We are creating this loading bar using jQuery so download jQuery latest version here.
jQuery Code within <head>..</head> tags
%MINIFYHTML705265eeb6ea4ec0e251aaa0d1e50c7319%%MINIFYHTML705265eeb6ea4ec0e251aaa0d1e50c7320%
HTML Code within <body>..</body>tags
Loading content, please wait..![]()
Make sure you add this code just below the starting <body> tag so it should be downloaded first.
CSS Code for loading DIV
#loading {
position:absolute;
width:300px;
top:0px;
left:50%;
margin-left:-150px;
text-align:center;
padding:7px 0 0 0;
font:bold 11px Arial, Helvetica, sans-serif;
}
Use your imagination and create something nice & unique.
View Demo | Download Source Code
Your comment, suggestion and feedback is highly appreciated.
There’s more to come to stay tuned…


