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:
- function initMenus() {
- $('ul.menu ul').hide();
- $.each($('ul.menu'), function(){
- $('#' + this.id + '.expandfirst ul:first').show();
- });
- $('ul.menu li a').click(
- function() {
- var checkElement = $(this).next();
- var parent = this.parentNode.parentNode.id;
- if($('#' + parent).hasClass('collapsible')) {
- $(this).next().slideToggle('normal');
- return false;
- }
- if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
- if($('#' + parent).hasClass('collapsible')) {
- $('#' + parent + ' ul:visible').slideUp('normal');
- }
- return false;
- }
- if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
- $('#' + parent + ' ul:visible').slideUp('normal');
- checkElement.slideDown('normal');
- return false;
- }
- }
- );
- }
- $(document).ready(function() {initMenus();
- });