Domanda

Okay so I have a navigation, that is hidden. When you click the trigger, the menu is shown.

I then have sub menus, that are hidden within the container div.

When I click the trigger, everything works fine, but it is showing the sub navigations as well.

Is there anyway to show the menu, on call, without showing the sub navigations?

        <div class="sidebardesktop">

                    <ul>
                        <li><a href="#" class="homenavtoggle">Home</a></li>
                        <li><a href="profile.html">Profile</a></li>
                        <li><a href="services.html">Services</a></li>
                        <li><a href="prices.html">Prices</a></li>
                        <li><a href="features.html">Features</a></li>
                        <li><a href="#" class="projectnavtoggle">project</a></li>
                        <li><a href="contact.html">Contact</a></li>
                        <li><a href="#"></a></li>
                        <li><a href="#"></a></li>

                    </ul>

                    <!-- SUB Menu - Desktop Only!
                    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
                    <ul class="home">
                        <li><a href="index.html">HomePage 1</a></li>
                        <li><a href="indextwo.html">HomePage 2</a></li>
                        <li><a href="indexthree.html">HomePage 3</a></li>
                    </ul>

                    <ul class="projectnav">
                        <li><a href="project.html">Video Project</a></li>
                        <li><a href="indextwo.html">Big Title Project</a></li>
                        <li><a href="indexthree.html">Gallery Project</a></li>
                    </ul>
                </div>

And the jQuery Below:

$('.homenavtoggle').click(function(){
$(".home").show('fastest');});

Basically I want to show the .sidebardesktop to show without showing the Sub Menus.

Any help would be appreciated.

È stato utile?

Soluzione

is this what you are looking for? you can add a class on to the top navigation and target that

FIDDLE

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top