I am using a script called dropotron which creates a nice pulldown menu from making lists.
eg.
<ul class="menu">
<li>home</li>
<li>Categories
<ul><li>foo</li><li>moo</li><li>too</li></ul>
</li>
</ul>
etc.
My problem is, that when I load a page, it takes a few seconds before the list turns into the menu how it should look and appears bad for the visitor.
My relevant code which includes the js,css etc. is:
<script type="text/javascript">
$(function() {
$('#menu > ul').dropotron({
mode: 'fade',
globalOffsetY: 11,
offsetY: -15
});
});
</script>
Any suggestions on how I could speed it up, or make it not happen at all?
Thank you.
takes a few seconds0_o. Potential can of worms. Who wants to start?#menu { display: none; }and in your script, after thedropotron()call, add$("#menu").show();ulhidden and on load, you may show and apply method.