Hiding <li>'s in JQ slider menu

Hiding <li>'s in JQ slider menu

Hey there, I have some jquery running on a menu ( here) but before jquery loads, the content (all of the <li>'s) appear, then disappear once jquery loads. Is there  a way to stop the brief displaying of the <li>'s?

The current jquery code is:

  1. function initMenus() {
  2. $('ul.menu ul').hide();
  3. $.each($('ul.menu'), function(){
  4. $('#' + this.id + '.expandfirst ul:first').show();
  5. });
  6. $('ul.menu li a').click(
  7. function() {
  8. var checkElement = $(this).next();
  9. var parent = this.parentNode.parentNode.id;

  10. if($('#' + parent).hasClass('collapsible')) {
  11. $(this).next().slideToggle('normal');
  12. return false;
  13. }
  14. if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
  15. if($('#' + parent).hasClass('collapsible')) {
  16. $('#' + parent + ' ul:visible').slideUp('normal');
  17. }
  18. return false;
  19. }
  20. if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
  21. $('#' + parent + ' ul:visible').slideUp('normal');
  22. checkElement.slideDown('normal');
  23. return false;
  24. }
  25. }
  26. );
  27. }
  28. $(document).ready(function() {initMenus();
  29. });