Collapsable menus question...

danhaskett / 2009-03-15 18:55:29   

Hi there

I was just wondering is there anyway of making it so that when you have one collapsable menu open, if you click on another menu, the other menu closes...so you only have 1 menu open at a time. I dont think ive seen this on any sites, but thought I'd ask just incase!

Thanks

Dan

cruz / 2009-03-15 19:22:27   

Apart from Vaska doing it for http://www.rogerarquer.com/ I think I remember that someone modified ross's version a while ago, you'll have to search the forum for it.

lemathieu A / 2009-03-15 22:28:40   

You can do it via "thenine plugin" you can found here as I done for my site (still working on).
Hope this helps.

cruz / 2009-03-16 09:19:34   

Here it is, and actually this final version is Vaska's. I was testing it and also got a few questions about it:
1. The cursor is set to text!? which is somehow no quite right. Finger would be more appropriate.
2. It doesn't work on the iPod, it remains all open.
Any clues?

Edit
Here we go...when something is clicked we hide all sections first THEN we show the active section...

// First we hide all exhibitis $("#menu ul li.section-title").nextAll().hide();

// then the active exhibit is showed
$("#menu ul").each(function()
{
$(this).find("li.active").prevAll().nextAll().show();
});

// This is the toggle function
// first it hides all sections
$("#menu ul li.section-title").click(function()
{
$("#menu ul li.section-title").nextAll().hide();
$(this).nextAll().slideToggle("fast");
});

It's not tested...let me know how it goes.

After the next version of Indexhibit is released I'm going to make this into an official plugin...crediting to thenine as well. ;)

danhaskett / 2009-03-16 10:55:51   

hi cruz,

ok i got that working, but i see what you mean about the cursor being set to text...it doesnt really look right which is a shame. i had a look on that rogerarquer website but couldnt find anything in the source of the page which showed what was being used to make it work...its a shame as it works nicely otherwise!

dan

Vaska A / 2009-03-16 10:57:16   

Roger is using new Indexhibit...the code won't work with your site.

danhaskett / 2009-03-16 11:00:11   

ahha ok, so there is nothing i can do, the best option is to have this text cursor? or to use the normal expanding menus?

lemathieu A / 2009-03-16 19:44:46   
1. The cursor is set to text!? which is somehow no quite right. Finger would be more appropriate.

Exact Cruz, I never been able to change it…
Sad, cause this is great !
By the way, thanks to everybody on this forum, and to Vaska the great.
Vaska A / 2009-03-16 19:52:02   

Why can't it be changed? Just style it...

lemathieu A / 2009-03-16 19:53:54   

I'm really a beginner in code, but thank ypou, I will try!

Vaska A / 2009-03-16 20:00:14   

I think it would be...

  1. #menu ul li.section-title { cursor: pointer; }

You could even fake the hover state on 'modern' browsers...

  1. #menu ul li.section-title:hover { color: #f00; }

Won't work in older IE's but who cares anymore...we're finally nearly free of that crap.

danhaskett / 2009-03-16 20:45:53   

hey vaska,

ok i tried that cursor tip and its worked great!

ive gone down to jquery 1.2.1 which i guess is the oldest version possible to use thenine menu js. however the slideshows still dont work...i did a google and could only find this

http://drupal.org/node/245721

but im not sure if thats the same slideshow creator... do you know if its possible at all? its a shame as i feel so close to getting the site how id like it to work but dont know how to sort this one problem out!

thanks again for your help,

dan

Vaska A / 2009-03-16 20:58:04   

Did you upgrade the cycle.all script? Search Google for "Jquery Cycle"...

Check the compatibilities...

This, is why I haven't released my updated expanding script...other things need updated and I'd rather make life easy for us around here rather than dealing with this same thing over and over.

danhaskett / 2009-03-16 21:10:21   

hmm i did a search for that, but i dont know to upgrade the cycle.all script.

was i right to copy the jquery 1.2.1 text into the jquery.js file so that it still has the same name?

i searched for jquery.cycle.all.js not working with jquery 1.2.1 but still couldnt find what to do.

do you know if it works? sorry, im really trying to work it out, going through jquery.cycle.all.js but dont know what to change!

thanks

dan

danhaskett / 2009-03-16 21:25:33   

sorry to be a pain, but i just changed my jquery.js file back to 1.1.2 to check if the slideshows would work then but they still arent working...im really confused. how do i get them working?

thanks

dan

Vaska A / 2009-03-16 21:38:28   

Well, it would have been much easier if you had just used the normal expanding script...now do you understand why I pulled my edited version out?

Do you remember when I said a few posts ago that it won't work?

Go back to the original js files...take out the added js files...and work with the things that really work. Or, be prepared to spend alot of time trying to make this work.

I pull things out for a reason...not because I have some ulterior motive (aside from saving people from really screwing up their sites).

danhaskett / 2009-03-16 21:42:19   

right ok, so basically if i want the slideshow to work then i need to have the expanding menu that ross cairns made - expandingmenus.js? i guess theres no way to modify that so that the menus close automatically?

thanks for your help, sorry i guess i was determined to get it working but it seems like a lost cause...

Vaska A / 2009-03-16 21:45:19   

You can modify all you want...if you know how. We can't fix everything...especially in a situation like this one.

danhaskett / 2009-03-16 21:52:46   

ok, i guess it wasnt to do with the jquery.js file...

i just went back to expandingMenus.js, but am still using the newer jquery 1.2.1 and the slideshows are now working, i guess it was to do with the thenine.js file...strange

maxwell / 2009-03-16 23:28:07   

I'm currently following Ross's instructions for expanding indexhibit menus. One question regarding step 4 and 5. He writes:

In the folder /ndzx-studio/site/sample/ edit the index.php file
step 5 in this file you should see something like:

beneath this add:

But, the index.php file I have (for Sampe) contains no code. Any suggestions?

Thanks much,

Max

maxwell / 2009-03-16 23:46:29   

.....This one has the code - sorry

I'm currently following Ross's instructions for expanding indexhibit menus. One question regarding step 4 and 5:

in the folder /ndzx-studio/site/sample/ edit the index.php file
step 5 in this file you should see something like:

script type='text/javascript' src='/site/js/cookie.js'>

beneath this add:

script type='text/javascript' src='/site/js/expandingMenus.js'>

the index.php file I have (for Sample) contains no code. Any suggestions?

Thanks much,

Max

Vaska A / 2009-03-17 00:41:17   

It should have code...you need to grab a fresh copy from the files you downloaded from us and reupload it.

maxwell / 2009-03-17 00:44:31   

maybe I need to download a fresh copy. thanks : )

m.

maxwell / 2009-03-17 00:48:49   

I may be completely lost, but the Sample theme index.php files I had and have downloaded simply have

    ‚Ä¢    Built with Indexhibit

No code.

Am I missing something? haha

- Max

Vaska A / 2009-03-17 01:12:22   

Yes, you are missing something...you should be editing with something that shows code. Like a text editor.

maxwell / 2009-03-17 01:16:22   

I'm using TextEdit (mac). ....what I always use.

Vaska A / 2009-03-17 01:18:06   

Did you download the file with Dreamweaver.

It's clearly not getting the code whatever is happening...it's showing you a rendered page.

The problem here is with your tools and how they are being used...it's not an issue with Indexhibit.

maxwell / 2009-03-17 01:22:01   

I realize it must be something very simple. Although, I simply downloaded the files again from the site (in Safari) and opened it up in Text Edit. Other files show code, just not this one.

I'll figure it out.... thanks anyhow.

maxwell / 2009-03-17 01:26:50   

I just opened the file in Safari, viewed source, copied then pasted the code in the index.php file I had open in Text Edit. I then swithced it to plain text. Maybe now I can edit it.

Not sure why that happened....

- Max

Vaska A / 2009-03-17 01:51:58   

TextEdit must parse html...hmmm...I'm not sure.

I use Textmate and/or Coda - it's the best stuff out there on the Mac. Not sure what folks on the PC side use.

lemathieu A / 2009-03-17 19:29:42   

Text Edit can open .css but not .php : use Texmate, Coda or Smultron (wich is free and powerful enough for what you need).
There is plenty of this softwares around you . Search google for php editors…

This thread has been closed, thank you.