Custom Ross Cairns Menu

bonuslazer / 2010-05-03 07:24:59   

I am using the expandable menu js by Ross Cairns (http://www.rosscairns.com/downloads/) and I want to change the script so that when i click a exhibition category the others collapse... then if I click another the first collapses while the new opens. Basically I only want one category open at a time. Any ideas on the code for something like this?

original:

  1. /*Expanding Menus for Indexhibit
  2.  *uses jquery
  3.  *
  4.  *Created by Ross Cairns  Mar 2008
  5. */

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") == false) {
items.hide();
}

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

arsondpi / 2010-05-03 08:14:42   

if you did a thorough search in the forum you'd bump into another script that does just that - so search for the nine script.

bonuslazer / 2010-05-07 03:50:23   

sorry, i'm just having trouble finding specific topics in this forum... how am I supposed to know to search for "nine script"... thanks

bonuslazer / 2010-05-07 04:16:21   

also I found "The Nine" and it doesn't work for some reason...

this is the code I found for it...

  1. $(document).ready(function()
  2. {
  3. $("#menu ul li.section-title").nextAll().hide();
  4. // then the active exhibit is showed
  5. $("#menu ul").each(function(){
  6. $(this).find("li.active").prevAll().nextAll().hide();
  7. });
  8. $("#menu ul li.section-title").click(function() //com o rato a pasar por cima e .click seleccionando
  9. {
  10. $("#menu ul li.section-title").nextAll().hide()
  11. $(this).nextAll().slideToggle("fast");
  12. });
  13. });
bonuslazer / 2010-05-12 22:35:04   

bump

anyone getting "The Nine" to work with their indexhibit site?

Vaska A / 2010-05-12 22:46:59   

Tons of people have...

Do you have a website?

lemathieu A / 2010-05-13 06:45:38   

… and did you upgrade your jquery version ?

bonuslazer / 2010-05-20 22:09:56   

just upgraded... still not working

Altarbeast Testing

bonuslazer / 2010-06-12 01:05:04   

Using jquery 1.4.2
Now The Nine works, but for some reason when I hover over the section titles the mouse is not in hyperlink mode. Any way to enable this?

lemathieu A / 2010-06-12 08:48:26   

in your style.css, add

  1. cursor: pointer;

to the #menu ul li.section-title

bonuslazer / 2010-06-25 00:46:30   

ok... finally got everything working properly... just a few coding/syntax error that had to be sorted out. I added the cursor css to the anchor tags in my stylesheet. Thanks guys!

This thread has been closed, thank you.