expandable menu problem..

groots / 2009-03-11 13:41:52   

I've followed Ross Cairns' instruction (www.rosscairns.com/downloads ) to set up an expandable menu, but it's showing no signs of working.

The website is http://tinyurl.com/cculbs

groots / 2009-03-11 13:44:31   

the relevant bit of code looks like this:

  1. $(document).ready(function()
  2. {
  3. ¬†¬†¬†¬†setTimeout('move_up()', 1);
  4.     expandingMenu(5);
  5. });

Vaska A / 2009-03-11 13:45:37   

Well, for starters it's not setup right...try this:

  1. expandingMenu(0);
  2. expandingMenu(1);
  3. expandingMenu(3);

Replacing the exsiting rule. The numbers refer to the ul groups...and with code you usually start with 0 not 1. So, we are applying the mene to the first, second and fourth ul groups (because they have subpages).

See how it goes.

groots / 2009-03-11 16:50:56   

Thanks for the help Vaska, having no joy with that code though.

I had 5 down because it's the menu-id for the portfolio section, i didn't realise it was meant to be ul groups. Where are the ul-groups defined? Simply by their order on the page?

Vaska A / 2009-03-11 17:14:04   

Where are the ul-groups defined? Simply by their order on the page?

Yep.

groots / 2009-03-11 17:34:31   

do you have any clue why it might not be working then?

thanks again for all the help!

cruz / 2009-03-11 17:42:14   

I don't think the expandable works on chronological sections, there's nothing to click on. Right?

Vaska A / 2009-03-11 17:51:36   

Ah...you could be right about that.

groots / 2009-03-11 19:24:54   

Would it not be the year that's clickable?

Hmm.. it was originally all entered under the one year (2009) and the menu heading was "portfolio". If I returned it to that state would the word portfolio expand when clicked?

Vaska A / 2009-03-11 20:21:11   

You could try it...something else doesn't seem right to me. Have you validated the page?

benipi / 2009-05-28 11:22:58   

hi there & thanxs for this wonderfull tool and great community of people. 4 weeks ago i thought i would never be able to create my own site.

so basically my question is:
I've also followed Ross Cairns' instructions, and everything is doing well except that the welcome/bienvenue page doesn't work anymore after you have clicked on one selection of the menu.

any idea why ?

benipi / 2009-05-28 11:23:26   

and well the site is http://benipi.com

lemathieu A / 2009-05-28 11:57:39   

you create tis bit of text (accueil/welcome) in the pre nav ?
your link is not working at all in all the cases…

lemathieu A / 2009-05-28 12:06:50   

Why < a onclick="do_click();" href="http://benipi.com/">Accueil - Welcome< /a>

Is the ; not coming after the " ?

Maybe try a simple < a href="http://benipi.com/">Accueil - Welcome< /a> (without spaces after

benipi / 2009-06-03 12:50:50   

thanxs !

castropereira / 2010-09-23 11:03:17   

i'm trying to configure my expandable menu so that it keeps just the active one open..

any clue??

still don't have my site on line!

Vaska A / 2010-09-23 12:48:42   

Put it online...then maybe we can help. It's rather hard for us to know what you are doing right now...

castropereira / 2010-09-23 14:01:52   

thanks!

but i think that my problem is in the .js file:

  1. function expandingMenu(num) {
  2. ¬†¬†¬†¬†var speed = 500;
  3.     
  4. ¬†¬†¬†¬†var item_title = $("#menu ul").eq(num).children(":first");
  5. ¬†¬†¬†¬†var items = $("#menu ul").eq(num).children().filter(function (index) { return index > 0; });
  6.     
  7. ¬†¬†¬†¬†/* hide items if not active */
  8. ¬†¬†¬†¬†if (items.is(".inactive") == false) {
  9.         items.hide();

    }

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

Vaska A / 2010-09-23 14:26:40   

Sorry, this tells us nothing. We really can't say much unless you put it online...otherwise all we're doing is guesswork.

castropereira / 2010-09-23 14:56:46   

the problem is solved:

/* hide items if not active */

  1. ¬†¬†¬†¬†if (items.is(".active") == false) {
  2.         items.hide();
  3.         

This thread has been closed, thank you.