1

I'd like to know if anyone knows how I can implement something like the following?

Here's a sample below:

enter image description here

And once you click on the plus, the menu expands:

enter image description here

I've googled and have found quite a few menus. But I'm looking for something that has this +/- functionality.

1
  • Typically the + and - are images that you control yourself which are toggled when you click on the image. Commented Dec 8, 2011 at 21:30

3 Answers 3

1

If it was me doing this, I'd do a jquery ui accordion with a single div. By default they use an arrow for the toggle, but it'd be trivial to change that out. Here's a tutorial on changing icons. It's infinitely adaptable using the API.

The biggest benefit is that if you already use jQuery UI, there's nothing else to load. You can't beat ThemeRoller for styling, either.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks @bpeterson76. I found how I can change the icons as well... pretty simple!
1

Nothing complicated here :) A simple slideToggle in jQuery (http://api.jquery.com/slideToggle/) binded to a click on that plus image and you have your effect :)

Comment if you need more code to understand.

Comments

0

If you want to use jQuery, you can use a TreeView extension

Once you have the HTML set up, one simple javascript call will get it working.

$("#yourDiv").treeview();

http://docs.jquery.com/Plugins/Treeview

Comments

Your Answer

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.