I think I have used a script from David's class to create my jQuery drop down menu. However, when Javascript is disabled, the menu won't display the next layer which it needs to otherwise it means people wont be able to access the sub menu if they have disabled JavaScript. I asked Prisca yesterday how I would do about this and she said it should be the JavaScript that hides the sub menu, not the CSS. I understand her in theory but when looking at my code I can't work out what to do. My CSS doesn't have anything hidden so it must be the jQuery doing it.
Does anyone know how to edit mys script or have a new better one?
My jQuery is:
And my markup is:Code:<script type="text/javascript"> $(document).ready(function(){ $("#link a").click(function(){ $("#portfolio-nav").slideToggle("slow"); return false; }); }); </script>
Thanks in advance!!Code:<ul id="main-nav"> <li><a href="#">Link 1</a></li> <li id="link"><a href="#portfolio-nav">Portfolio</a></li> <li><a class="current" href="#">Link 3</a></li> <li><a href="#">Link 4</a></li> </ul> <!--close main-nav--> <ul id="portfolio-nav"> <li><a href="#">Photography</a></li> <li><a href="#">Web</a></li> <li><a class="current" href="#">Graphic</a></li> <li><a href="#">Artwork</a></li> </ul> <!--close portfolio-nav-->
Matine


Reply With Quote

Bookmarks