I found a discussion of my problem here: http://p.karageorgakis.com/blog/jquery_simulating_a_delay_function_between_fade_in_out_effects/
Among the solutions proposed, the javascript setTimeout()
trumped the other solutions, at least for my purpose.
Here is the code I went with:
$(function() {
$("#tabs").tabs();
$("#tabs").fadeIn(500);
$("#li1").fadeIn(500);
setTimeout('$("#li2").fadeIn(500)', 300);
setTimeout('$("#li3").fadeIn(500)', 600);
setTimeout('$("#li4").fadeIn(500)', 900);
});
The tabs widget itself as well as the list items are all set to display:none
at the outset.
There was another issue that I will share, because it led me to the nice fade solution.
This widget needed to float to the left of some other content, but also needed to be hidden until fully instantiated by JQuery. fadeIn()
wasn't working with an element set to visibility:hidden
; it had to be display:none
, but this caused the widget to displace the surrounding content and appear abruptly, which looked really awful. Fading in was a way to mitigate that.
In retrospect, maybe I could block off the (known) dimensions of the tabs widget, anyway I like the result I got!