If you support CSS3, you can try to do something like this, albiet, it might be better to create an animation class.
.item:nth-child(1) { transition-timing-function : ease-in-out; transition-property : left; transition-duration : 0.1s; transition-delay : 0.35s; } item:nth-child(2) { transition-timing-function : ease-in-out; transition-property : left; transition-duration : 0.1s; transition-delay : 0.55s; } .item:nth-child(3) { transition-timing-function : ease-in-out; transition-property : left; transition-duration : 0.1s; transition-delay : 0.65s; } .item:nth-child(4) { transition-timing-function : ease-in-out; transition-property : left; transition-duration : 0.1s; transition-delay : 0.75s; }â
If you want to use jQuery, I had some success with http://api.jquery.com/queue/ , which will allow you to create a more complex animation chain. For an unknown number of children, you can use the slice() method.
I modified this piece of self-executing code found at http://paulirish.com/2008/sequentially-chain-your-callbacks-in-jquery-two-ways/
(function hidenext(jq){ jq.eq(0).fadeOut("fast", function(){ (jq=jq.slice(1)).length && hidenext(jq); }); })($('div'))
You do not need to use fadeOut , and it does not have to be executed independently, but it is a neat and tidy way to apply the "transition" to an unknown number of elements.
Here's a fiddle using fadeOut http://jsfiddle.net/NpBfJ/ ... this is probably more work than you want ... :-)
As for the sliders, this is one of the best free http://caroufredsel.dev7studios.com/ , it has many customizable features.
Foreign object
source share