Expandable Menu

restre / 2010-07-30 22:23:44   

So I finally got the expandable menu workin on my page.

Now I am trying to do the following:
If I click a menu item, the other one closes automatically.

This is the .js file from Ross Cairns:

  1. function expandingMenu(num) {
  2. var speed = 100;

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") == false) {
items.hide();
}
/* add click functions + pointer to title */
item_title.css({cursor:"pointer"}).toggle(
function () {
items.show(speed);
}, function () {
items.hide(speed);
}
)
}

  1. From my none javascript experience, I think the
  2. if (items.is(".active") == false) {items.hide();} would be the part where I have to put some kind of code that hides the newly inactive menu item.

Please giveme a boost on this!! :)

Thanks!!!!

lemathieu A / 2010-07-31 08:38:08   

Hello,
have a search for "the nine" colapsable menu.

restre / 2010-08-02 05:34:54   

Ok, I searched for "the nine" script...

Thanks!!!!

Gonna have a look at it and give it a go to see the results!!!

I'll let ya know how it goes!!!

TY!!!!

anoxus / 2010-08-04 15:55:44   

dsc

ulkor / 2010-08-11 07:45:22   

Hi ,
I'm using the nine's script for expandable menu and I m trying to change the color of the active menu title

I tried something like this and it doesnt work :
#menu ul li.section-title:ACTIVE {color:#000;}

here is a link : alwaysflightfirst.webege.com

I've searched in the forum but didn't find anything about it.

Any help would be very much appreciated

arsondpi / 2010-08-11 08:13:45   

Seriously - do you need to post the same question in three different threads???

Please read the forum rules!!!

ulkor / 2010-08-11 08:32:31   

Oups. I tried to post in other treats but it return me home page of the forum with a page a "page not found" message . I thought it didnt worked because these treats was closed or something. so I tried another one...

my mistake.
how can I erase those ?

jkm / 2010-08-11 09:27:49   

I have also experienced this "page not found " message after posting a message. Is the server acting up?

Jesper.

arsondpi / 2010-08-11 09:44:43   

@jkm maybe... I got this as well

@ulkor please read the forum rules once again - especially the "linking back" part...

ulkor / 2010-08-11 10:00:05   

Sorry the link was there but in white. forgot to change when I changed the background color.

This thread has been closed, thank you.