> > This works great on my localhost. However, when I publish online I > experience a problem: on page load the whole <ul> is shown for a > second, including all nested <ul> submenu's, before it is hidden by > jQuery. I guess this is because all <ul> elements need to be loaded > into the DOM before the jQuery code is started?
Are you using the onload event or jQuery's document ready method? If you're using onload then you need to wait until all assets like images, flash movies have downloaded before the hide() function runs. The jQuery method will hide the nested ul as soon as the dom is ready to be manipulated $(document).ready(function(){ $(ul ul).hide(); }); --dave