| Trouble with JavaScript Base dropdown menus
|
Sarah Atkinson

msg:3873265 | 2:57 pm on Mar 18, 2009 (gmt 0) | I have a drop down menu that uses JS to hide sub uls when it initiates the menu it hides all the sub uls. However I want to be able to over ride this sometimes and have one ul showing on initiation.
function initMenu() { $('#menu ul').hide(); $('#menu li a').click( function() { var checkElement = $(this).next(); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { checkElement.slideToggle('normal'); return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } ); } $(document).ready(function() {initMenu();});
[edited by: Sarah_Atkinson at 2:57 pm (utc) on Mar. 18, 2009]
|
idev

msg:3874648 | 9:45 pm on Mar 19, 2009 (gmt 0) | Hello Sarah, Please post the whole sample page and describe what you wish to achieve.
|
|
|