Forums » Installation

Expanding menu

kenny
UNITED STATES
2011-10-10 17:48:05
Permalink Post
 

I have expanding menus, and i have them all to expand when choosing one.

My question is that i don't know how to make them stay expanded after clicking on the submenus. Now they collapse, but i want them to stay expanded after ive selected one.

My site: www.kennybengtsson.se

This is my expandingmenus.js if this helps to understand/explain:

var item_title = $("#menu ul").eq(num).children(":first");
var items = $("#menu ul").eq(num).children().filter(function (index) { return index > 0; });
var items1 = $("#menu ul").eq(1).children().filter(function (index) { return index > 0; });
var items2 = $("#menu ul").eq(2).children().filter(function (index) { return index > 0; });
var items3 = $("#menu ul").eq(3).children().filter(function (index) { return index > 0; });
var items4 = $("#menu ul").eq(4).children().filter(function (index) { return index > 0; });
var items5 = $("#menu ul").eq(5).children().filter(function (index) { return index > 0; });
var items6 = $("#menu ul").eq(6).children().filter(function (index) { return index > 0; });
var items0 = $("#menu ul").eq(0).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);
items1.show(speed);
items2.show(speed);
items3.show(speed);
items4.show(speed);
items5.show(speed);
items6.show(speed);
items0.show(speed);
}, function () {
items.hide(speed);
items1.hide(speed);
items2.hide(speed);
items3.hide(speed);
items4.hide(speed);
items5.hide(speed);
items6.hide(speed);
items0.hide(speed);

}
)

hugonascimento
PORTUGAL
2011-10-10 19:01:40
Permalink Post
 

Hi!

You should use the instructions in this thread:

http://www.indexhibit.org/forum/thread/761/

titled "Tutorial: collapsable menu -Spanish"

You have here the simple 4 steps to do it:
http://www.criteriondg.info/wordpress/menu-acordeon-con-indexhibit-en-4-pasos/

1 - download latest JQuery:
http://docs.jquery.com/Downloading_jQuery

2 - copy by replacing the existing version to JS folder
[ndxz-studio] > [site] > [js]

3 - download JScript "collapsable menu" through this link:
http://www.criteriondg.info/varios/collapsable.menu.js

4 - call the JS in your index.php

5 - done! enjoy!

the author's portfolio:
http://www.criteriondg.info/portfolio/

i've also used it for my website:

http://aex-studio.com

regards
hugo

hugonascimento
PORTUGAL
2011-10-10 19:04:00
Permalink Post
 

btw

i still didn't figure out how to make the "title" like a link, as the author's portfolio demonstrates, and yours.

btw gr8 website!

r.
hugo

jnine
SWITZERLAND
2012-02-01 17:56:39
Permalink Post
 

hi there,
i have an expanding menu but since i made that mt STARTSEITE does not work anymore... why is that?

http://zuest-gruengestaltung.ch/index.php?/gaerten/begruenungen/

thank you for your help :)

rickykappa A
ITALY
2012-02-01 18:57:05
Permalink Post
 

erase the following line from your index.php
    expandingMenu(0);
that should work
;-)

jnine
SWITZERLAND
2012-02-01 23:44:49
Permalink Post
 

:) thaaaank you :) that was it!!!

Showing 1 - 6 of 6 posts in Forum > Installation > Expanding menu
 

You need to be logged in to post.