I'm currently using Ross Cairns script on my site here:
Link
But instead of Expanding the menu's one at a time, i want to expand all of them
at once. (Like the menu on this website)
Here is my .js
/*Expanding Menus for Indexhibit
*uses jquery
*
*Created by Ross Cairns Mar 2008
*/
function expandingMenu(num) {
var speed = 300;
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);
}
)
}
- And here is my index.php from my theme:
path = '/files/gimgs/';
$(document).ready(function()
{
setTimeout('move_up()', 1);
expandingMenu(0);
expandingMenu(1);
expandingMenu(2);
expandingMenu(3);
expandingMenu(4);
expandingMenu(5);
expandingMenu(6);
});
Can somebody help me with this?
Thanks guys!