I'm using .each and .delay to have a background color crawl down some list items, as below. But I can't figure how to then trigger a change, such as another background color, after all the .each iterations are complete. Everything I do with the returned object happens immediately. Suggestions? tks.
- <script type="text/javascript">
- var saveObj;
- jQuery(function(){
- jQuery('#text li').each(function(i){
- jQuery(this).delay(i*1500).fadeIn(1500,function(){
- jQuery(this).css({'background-color':'orange','border':'solid 2px red'});
- }
- );
- }).css("background-color","red");
- });
- </script>