Show hide menu using JQuery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colinod
    Contributor
    • Nov 2007
    • 347

    Show hide menu using JQuery

    I have a menu that is using the following to show and hide the menu

    Code:
      	$(document).ready(function(){
    		
    		// Hide all unordered lists that are descended from the navigation
    				$("#nav ul").hide();
    				$("#artistnav ul").hide();
    				//$("#nav ul").css('visibilty', 'visible');
    				
    				jQuery('a').bind('click', function(){
    					// on clicking the link get the parent li then find the first ul you can and display
    					$(this).parents("li:first").find("ul:first").slideToggle(1000);
    					//return false;
    				});
    	});
    On some ie9 computers it is showing all the buttons in the sections when it loads, i cant figure out how to stop it doing this?

    page can be seen here http://www.yaketyyakallmouth.com/pag...asp?id=All#183

    not even sure if JQuery can be helped here

    thanks

    colin
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What you can do is have them hidden initially via CSS, not via JavaScript onload as you're currently doing.

    If you want to support users without JavaScript enabled (as you should), you can link to and load a new page with the corresponding buttons showing.

    Comment

    Working...