Progress indicator by animating background position
This post experiments with different patterns for indicating progress, you know, those "loading...", "Please wait..." type of things. The progress is shown by using JavaScript to animate the CSS background position.
TheSixtyOne.com
There's this cool site called http://www.thesixtyone.com/, great for discovering new music (if they only agree to ban Foo Fighters, the site will be perfect). Discovering music but also discovering interesting web design patterns, as it turns out.
TheSixtyOne.com shows a progress indicator when you click a song, as if the background shows how the song gets loaded. So I had to try implementing this myself and I also played with two other variants of the background animation.
Here's a video, a little screencast to demonstrate how the loading looks like:
Here are the three examples, take a look at the code, there are no external JavaScript libraries, just some do-it-yourself animation with setInterval()
Example #1 - filling the background
For this you get an image that is at least as long as the container you're about to animate. The height of the background image doesn't matter, could be just one pixel. Here's the image I used.
Ar the start of the animation, the background image is so to the left, it's invisible. At the end of the animation, the background fills out the whole container.
Example #2 - overflowing background
This is a modified version of the previous pattern. Once the background is filled the animation keeps going, so the background escapes from view. Then it's moved back at the beginning and the animation repeats.
Example #3 - dancing arrow
If you remember old radios, this pattern looks like you're playing with the dial. Here, the background image is different, just a small square basically. It gets repeated vertically. Here's the backgournd.
Tags: animation, background position, experiments, progress indicator
July 25th, 2008 at 12:38 am
[...] Last, not least, I decided to try and find some time to update my JavaScript patterns site. Unfortunately I got sidetracked (yep, I’m easily distracted by shiny objects) and played with a not-so-javascript pattern. The post I published (includes a pretty lame screencast! and) demonstrates how you can use animated background position to indicate loading progress. [...]
August 10th, 2008 at 7:36 pm
hi, andar here, i just read your post. i like very much. agree to you, sir.
September 5th, 2008 at 4:15 am
[...] – bookmarked by 5 members originally found by peacay on 2008-08-17 Progress indicator by animating background position http://www.jspatterns.com/progress-indicator-by-animating-background-position/ – bookmarked by 4 [...]
November 25th, 2008 at 7:45 pm
Cool…,though its something that you learn in your free time.Its like a sliding div.
January 24th, 2009 at 5:42 am
that looks great but if you notice in the website the Progress Bar is going on as the music is going to be loaded I was wondering How can we load a html in a div and figure out how much (bytes) of the code has been loaded , what is your Idea ?
July 1st, 2009 at 8:59 am
[...] UX or User Experience Design Patterns in Ajax Patterns and was merrily reading on the Quince and JS Patterns Progress Indicator Pattern articles when I stumbled upon this idea that I should blog about the UI [...]
April 7th, 2010 at 1:55 pm
From where you guys get so correct info , i can’t even imaging
September 15th, 2011 at 3:19 pm
excellent post, I’m a drum student myself
December 10th, 2011 at 11:43 pm
sell suprisely to get new coupon
December 14th, 2011 at 11:53 am
web design jobs los angeles ca…
[...]JSPatterns.com » Blog Archive » Progress indicator by animating background position[...]…
December 14th, 2011 at 7:39 pm
Intriguing blog site by an stylish templates, it could be greater if practically all the current material on your blogging site is manufactured exclusive with appealing topics that will give you far more website visitors to your internet site.
December 15th, 2011 at 5:00 pm
Nice post. I was checking constantly this blog and I am impressed! Extremely helpful info specifically the last part
I care for such information a lot. I was looking for this certain info for a very long time. Thank you and good luck.
December 16th, 2011 at 2:03 pm
I need your web site.. pleasant colors & theme. Have you create this page yourself or did you employ someone to get it done on your behalf? Plz answer back as I��m hoping to design my personal blog and would like to know where u got this from. thanks
December 17th, 2011 at 9:46 am
JSPatterns.com » Blog Archive » Progress indicator by animating background position It’s arduous to seek out educated individuals on this matter, but you sound like you understand what you’re talking about! Regards, Teak Furniture catalog
December 17th, 2011 at 12:33 pm
The ruling routine in Iran are likely to get supported an attack over the UK’s embassy in Tehran, the British ambassador into the place has explained.
January 3rd, 2012 at 1:40 pm
This is my first time i go here. I stumbled onto lots of interesting stuff in the blog especially its discussion. Out of your lots of comments with regards to your articles, Perhaps Get alone having most of the enjoyment here! stick to the great work.
January 3rd, 2012 at 2:37 pm
design…
[...]JSPatterns.com » Blog Archive » Progress indicator by animating background position[...]…
January 3rd, 2012 at 2:44 pm
i am a sufferer of back pains and i tried some herbal stuffs to alleviate the pain additionally it worked**