Web Analytics Made Easy -
StatCounter Need help jquery accordion - CodingForum

Announcement

Collapse
No announcement yet.

Need help jquery accordion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jQuery Need help jquery accordion

    I'm trying to ad another level to this dropdown but not sure how here is my java and html

    Code:
    function initMenu() {
      $('#menu ul').hide();
      $('#menu ul:#open').show();
      $('#menu li a').click(
        function() {
          var checkElement = $(this).next();
          if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
            return false;
            }
          if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
            $('#menu ul:visible').slideUp('normal');
            checkElement.slideDown('normal');
            return false;
            }
          }
        );
      }
    $(document).ready(function() {initMenu();});
    
    
    
    
    
    <ul id="menu">
        	<li>
            	<a href="#">Main</a>
                <ul>
                	<li><a href="about.php"<?php if ($pageName=="about") echo 'class="current"'; ?>>About Us</a></li>
                	<li><a href="gov.php"<?php if ($pageName=="gov") echo 'class="current"'; ?>>Government Division</a></li>
    				<li id="hcomm"><a href="comm.php"<?php if ($pageName=="comm") echo 'class="current"'; ?>>Commercial Division</a></li>
                    <li><a href="contact.php"<?php if ($pageName=="contact") echo 'class="current"'; ?>>Contact Us</a></li>
    			</ul>
    		</li>
    		<li id="gov">
    			<a href="#">Government Division</a>
    			<ul>
                    <li><a href="architecture.php"<?php if ($pageName=="architecture") echo 'class="current"'; ?>>Architecture</a></li>
    				<li><a href="modeling.php"<?php if ($pageName=="modeling") echo 'class="current"'; ?>>Modeling & Simulation</a></li>
    				<li><a href="data_analysis.php"<?php if ($pageName=="data_analysis") echo 'class="current"'; ?>>Data Analysis</a></li>
                    <li><a href="programming.php"<?php if ($pageName=="programming") echo 'class="current"'; ?>>Software Development</a></li>
                    <li><a href="logistics_consulting.php"<?php if ($pageName=="logistics_consulting") echo 'class="current"'; ?>>Logistics Consulting</a></li>
                    <li><a href="gsa.php"<?php if ($pageName=="gsa") echo 'class="current"'; ?>>GSA</a></li>
    			</ul>
    		</li>
            <li id="comm">
    			<a href="#">Commercial Division</a>
    			<ul id="open">
    				<li>
                    	<a href="asset_management.php"<?php if ($pageName=="asset_management") echo 'class="current"'; ?>>Asset Management</a></li>
                		<ul>
                        	<li><a href="ecy.php"<?php if ($pageName=="ecy") echo 'class="current"'; ?>>E-Cycle</a></li>
                            <li><a href="retail_store.php"<?php if ($pageName=="retail_store") echo 'class="current"'; ?>>Retail Store</a></li>
                            <li><a href="non_profit.php"<?php if ($pageName=="non_profit") echo 'class="current"'; ?>>Non-For Profit</a></li>
                        </ul>
                    <li><a href="networking.php"<?php if ($pageName=="networking") echo 'class="current"'; ?>>Network Services</a></li>
    			</ul>
    		</li>
            <li>
            	<a href="contact.php">Contact Us</a>
            </li>
    </ul>
Working...
X