I'm using css to not display any of the contents of the sections where the content is (eg. class=services,class=contact). And I'm trying to get jQuery to show the content the user wants, then hide that content when the user clicks on another menu item and show that content.
This the basic html structure:
Expand|Select|Wrap|Line Numbers
- <nav>
- <ul>
- <li class="navServe">Services</li>
- <li class="navContact">Contact</li>
- </ul>
- </nav>
- <section class="content">
- <section class="services">
- <p>Content for services section</p>
- </section>
- <section class="contact">
- <p>Content for contact section</p>
- </section>
- </section>
Expand|Select|Wrap|Line Numbers
- $("nav").click(function() {
- $(".services").hide("fast");
- $(".contact").hide("fast");
- $(".content").toggle("fast");
- return false;
- });