1

I was looking to implement such menu as

http://www.fogcreek.com/FogBugz/learnmore.html (Left hand side)

Can anyone recommence some plug-in for jquery, or any other JavaScript library which behave same as above site?

asked Aug 29, 2009 at 15:28

4 Answers 4

1

Using jQuery, I have this script which I use:

$(document).ready(function() {
 $(".nav > li > a").click(function() {
 $("ul", $(this).parent()).slideToggle("normal");
 return false;
 });
 $(".nav ul").hide(); // Hide all on load. Done here rather than in CSS so users
 // see the menu if they have javascript disabled.
});

The menu is marked up in HTML as:

<ul class="nav">
 <li><a href="#">Header</a></li>
 <li>
 <ul>
 <li>Sub list Items</li>
 <!-- More -->
 </ul>
 </li>
 </ul>

for each expandable section.

answered Aug 29, 2009 at 15:31
Sign up to request clarification or add additional context in comments.

Comments

1

jQuery Accordion does that.

You can use this code (from the jQuery Accordion page) to try it out:

Head:

<script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.accordion.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#accordion").accordion();
});
</script>

Body:

<div id="accordion">
 <h3><a href="#">Section 1</a></h3>
 <div>Mauris mauris ante</div>
 <h3><a href="#">Section 2</a></h3>
 <div>Sed non urna</div>
 <h3><a href="#">Section 3</a></h3>
 <div>Nam enim risus </div>
 <h3><a href="#">Section 4</a></h3>
 <div>Cras dictum</div>
</div>
answered Aug 29, 2009 at 15:30

Comments

0
answered Aug 29, 2009 at 15:59

Comments

0

I had tried the jquery plug-in, it doesn't fit my requirement.

However, I am able to make it works, by copying JS and CSS from other sites :

http://jstock.sourceforge.net/features.html

answered Sep 1, 2009 at 5:11

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.