Customize a Collapsible Menu - Js

pedroooo / 2011-04-19 08:27:42   

Hi again,
I'm making a theme to have a horizontal collapsible menu.
This is I go so far.

Know I have some customizations to do like:
— when I click on a menu and it's active and after i click another menu that one it was active just turn off.
— and finally when the menu it's active and i click on a children menu and I want that menu continues active.

It's possible? Any help? I can make by java? How?

Thanks in advance

pedroooo / 2011-04-19 08:38:59   

this is mine js:

/*    Expanding Menus for Indexhibit
*        uses jquery
*
*    Created by Ross Cairns Mar 2008
*/

function expandingMenu(num) {
    var speed = 0;
    
    var item_title = $("#menu ul").eq(num).children(":first");
    var items = $("#menu ul").eq(num).children().filter(function (index) { return index > 0; });
    
    /* hide items if not active */
    if (items.is(".active") == true) {
        items.hide();
    }

    /* hide items if not active */
    if (items.is(".active") == false) {
        items.hide();
    }
    
    
    
    /* add click functions + pointer to title */
    item_title.css({cursor:"pointer"}).toggle(
        function () {
            items.show(speed);
        }, function () {
            items.hide(speed);
        }
    )
}

Vaska A / 2011-04-19 08:52:55   

There is code around the forum to do this but you need to search and dig it up. Try searching "thenine" and see if you can find it.

Also, please read the forum rules, thanks.

pedroooo / 2011-04-20 03:22:23   

Sorry. I just erase to see how it's looks the menu.

  1. I done it.
  2. Know another question... how can i edit the:
  3. plug:front_index /

I need to put a break line in the menu. Anyone?

This thread has been closed, thank you.