Forums » Ideas

Tutorial: collapsable menu -Spanish

bcaptured
GERMANY
2008-12-27 01:17:13
Permalink Post
 

for menus that are closing if i click on another, how exactly does the js file look like?

the normal one is:

  1. function expandingMenu(num) {
  2.     var speed = 200;
  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. /* hide items if not active */
  7.     if (items.is(".active") == false) {
  8.         items.hide();
  9.     }
  10. /* add click functions + pointer to title */
  11.     item_title.css({cursor:"pointer"}).toggle(
  12.         function () {
  13.             items.fadeIn(speed);
  14.         }, function () {
  15.             items.fadeOut(speed);
  16.         }
  17.     )
  18. }

thanks in advance for any help.

michaelj
SWITZERLAND
2009-01-08 10:57:16
Permalink Post
 

Hey everybody.

Thanks a lot for everybody's help!

The accordion menu works now. When I click on a new link in a different
menu-point, the other open menus don't close:
http://www.michaelhaene.com/test

I used this Js (even though, i don't understand it entirely, but it seems to work)
http://www.michaelhaene.com/test/ndxz-studio/site/js/expandingMenus.js

The thing is, when I reload the page, the menu-situation is exactly the same, as it was the last time, i left the page (a few menu points are opened).

QUESTION:
How can i make, that at a reload, all menu-points are closed/in default mode?

Thanks a lot for an answer.

kempkeith
UNITED STATES
2009-01-11 00:04:56
Permalink Post
 

please, can we get an answer to bcaptured's question???
i don't even know where to start inserting the code provided-where meaning at exactly what line in the index.php file.

Vaska A
UNITED STATES
2009-01-11 00:24:12
Permalink Post
 

Don't use Vaska's...I have repeatedly said not to use my iteration on this code for now.

Hammer
AUSTRALIA
2009-01-14 02:33:13
Permalink Post
 

rcairns thank you - code worked a charm!

altoclark
FRANCE
2009-02-04 13:05:40
Permalink Post
 

Rcairns, I must be a total dumbhead cause it doesn't seem to work on my page

www.altoclark.net
Javascript

Any idea ?

Thanks

altoclark
FRANCE
2009-02-05 08:55:42
Permalink Post
 

:(

ThinkCube
SPAIN
2009-02-05 23:01:32
Permalink Post
 

Ei altoclark, you have a little error in your index.php page,
you did not link de javascript file to your index page.

You have to add this line in head scripts, in the index.php file from your site style folder:

Sorry about my bottled english.
A bientôt!

ThinkCube
SPAIN
2009-02-05 23:11:11
Permalink Post
 

Sorry, i miss the code line that i'm talking about, here it is...

  1. <script type='text/javascript' src='<%baseurl%><%basename%>/site/js/expandingMenus.js'></script>
struba
NETHERLANDS
2009-02-10 13:37:18
Permalink Post
 

thanks a lot for the expandingmenus script!

i have 2 questions:

- i would really like all sections closed by default when visiting the page. Atm the first section is open by default and the rest is closed
How can I show them all closed by default?

- i have the menu in a bullet list. In internet explorer all exhibits in their sections show these bullets when expanding and collapsing menus In firefox they're there when first visiting, but collapsing and expanding a section makes them disappear. Anyone know how to overcome this?

help is much appreciated

site is here: www.mirteslaats.com

again, thanks a lot.
Struba

cruz
PORTUGAL
2009-02-10 14:21:38
Permalink Post
 

The "Grijs" section is your home, that's why the "Werk" section is open when loading your home page. As a solution you can hide Grijs from index and link back home through your name: Mirte Slaats.

struba
NETHERLANDS
2009-02-10 15:15:20
Permalink Post
 

thanks Cruz, that worked!
For people trying to hide an exhibition from index:
Found the option to hide a page in the additional settings, which can be found at bottom right when editing an exhibition.
Thanks again,
Struba

protello
RUSSIA
2009-02-14 13:22:10
Permalink Post
 

hi everyone!

first of all: thank you for all your tutorials, it helped a lot, almost got what i want.

just wonder:

1) did anyone solve the problem with everything-but-active collapsed sections?

2) Rcairns' script version works well in safari, but it just not active in FF3. i'm running all of them on mac and can't test it on the windows.

could anyone help me with the solution?
thank you very much in advance!

link to check www.proteytemen.com

protello
RUSSIA
2009-02-16 11:21:27
Permalink Post
 

uhm, sorry, new trouble: as i checked in the FF2 on mac, it prevented me to open
any menu link. i have no idea why it goes like that, but it forced me to turn off the script.

still looking forward for any commentaries or help. thanks.

Vaska A
UNITED STATES
2009-02-16 22:08:52
Permalink Post
 

The place to start with with validating your code. There are a bunch of issues here that are causing issues...

protello
RUSSIA
2009-02-16 23:37:28
Permalink Post
 

thank you, Vaska. oh my god... interesting, how i achieved so amazing results.

Thisisme
DENMARK
2009-02-25 11:43:20
Permalink Post
 

How do I make the menu #1 collapse (close) when clicking menu #2, etc?
This is the site: http://www.minsandten.dk/test.php

It's done her: http://www.lap-land.dk - but I can't figure out how.

Vaska A
UNITED STATES
2009-02-25 12:27:52
Permalink Post
 

Ask whoever owns lapland...as the link doesn't work...or hire a programmer to help you out.

Don't know...

But you've already built a bunch of Indexhibit websites for your clients...I would think you would know.

Hilda
UNITED STATES
2009-02-27 01:57:43
Permalink Post
 

Thanks Ross for your wonderfully precise instructions & download. Worked beautifully.

SuperDuper
UNITED STATES
2009-03-03 01:21:01
Permalink Post
 

I've been working with this dropdown and have found that when the sub-items first drop down the fonts look a bit chunky. Once a project is selected they get clean.
I found that it is an opacity issue. Firebug says the fonts are being set to 0.999 opacity but I can't find a place to edit it. Has anyone else had this issue and found a solution?
site

SuperDuper
UNITED STATES
2009-03-03 01:22:32
Permalink Post
 

Scratch the above if you can.

kreofina
POLAND
2009-03-04 13:24:54
Permalink Post
 

I have two questions regarding this awesome script:

1) Is It posible to set up the first of collapsable menus to be expanded during initial page load?

2) Is it possible to make the cursor change into "hand" when hovering on collapsing menus section titles? Right now I have "type" cursor all the time.

I've tried to found solution to this issue around the forum but either I am missing something or there is nothing there about it. I would greatly appreciate any help in this matter.

Devafilms
UNITED STATES
2009-03-23 10:42:58
Permalink Post
 

Hello - I love love Indexhibit it's an open door to amazing adventures - thanks so much - I also love the way you manage this - you are such an inspiration.

I would love some help.

I have tried many times to make my menus collapsable

I have studied Thenine and Vaska's work and I am stuck.

Should we be putting this code into the style.css. ?

I have a feeling I am missing something very basic here. Can anyone enlighten me please ?

The text shifts under the menu and the menu items remain still - it looks so terrible I have not kept it up out of vanity - but if it helps I will show anyone who can help.

Deva Films

Vaska A
UNITED STATES
2009-03-23 11:13:19
Permalink Post
 

On the first page of this thread cairns gives a step by step approach to doing this...I think it's pretty explanatory.

Devafilms
UNITED STATES
2009-03-23 11:24:17
Permalink Post
 

Thanks so much Vaska - I'll try it now. Wishing you a fab day.

Devafilms
UNITED STATES
2009-03-23 17:20:10
Permalink Post
 

Thanks so much Vaska - it works!
I had one gap in the script wrong and have now set that right.
Thank you!!!

carlo
ITALY
2009-03-23 22:04:02
Permalink Post
 

Hello!
I have been trying for hours and hours to follow step-by-step the instruction to have a collapsable menu but still haven't got through it :(
I have checked many times in the index.php file that I copied all the scripts properly and that it called the right .js files.

My site is www.carlitoplays.com

I'd really be pleased if someone could tell me what I'm doing wrong.
Thank you very much indeed!

Carlo

Vaska A
UNITED STATES
2009-03-23 22:27:30
Permalink Post
 

Well, this is messed up code...

http://www.carlitoplays.com/ndxz-studio/site/js/expandingMenus.js

carlo
ITALY
2009-03-23 22:36:38
Permalink Post
 

I fixed the code but it still doesn't work... :(

(thank you very much you're very kind!!)

Vaska A
UNITED STATES
2009-03-23 22:45:15
Permalink Post
 

The code looks the same still...I think you have an issue with your editing application.

carlo
ITALY
2009-03-23 22:47:55
Permalink Post
 

mmm so strange....with Opera I can see it tidy, with Firefox all messed up....and if I open the .js menu it IS fine....

jonnylops
UNITED STATES
2009-04-01 03:31:51
Permalink Post
 

Hi all,
thank you for all this work. I was able to make my menu expand using Rosses awesome tutorial. Now I want to achieve what Mitch was asking from page 1: "if B is open and i click on C, B closes automatically." I assume this is the code to do this:

  1. // First we hide all exhibits

$("#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

$("#menu ul li.section-title").click(function(){
$(this).nextAll().slideToggle("fast");
});

Does this go in the index.php or in the expandingMenus.js?
Thank you!

cruz
PORTUGAL
2009-04-01 07:30:37
Permalink Post
 

You have to read the rest of the thread, that's not a working version. You can create a whatever.js file and link it in the index.php site/whatever.js You'll have to have the right jQuery version though.

mdominguezjr
UNITED STATES
2009-04-06 16:35:29
Permalink Post
 

my apologies if this has been answered elsewhere but i am having difficulty finding a solution to this issue:

using rosscairns tutorial for expanding menus, does anybody know how to adjust the speed of the expanding menu? i am not sure where in the code to place the "speed-xxx" part of the code.

thanks in advance.

the code i have in my site looks like this:

$(document).ready(function()
{
    setTimeout('move_up()', 1);
    expandingMenu(0)
    expandingMenu(1)
    expandingMenu(2)
    expandingMenu(3)
    });

mdominguezjr
UNITED STATES
2009-04-06 18:55:43
Permalink Post
 

ignore me. i am an idiot. looking in the wrong place. duh.

jordalkombat
UK
2009-04-20 19:34:27
Permalink Post
 

hey all, sorry if this has been answered elsewhere but i'm really struggling and can't find the solution.
Since I've used ross cairns' expandable menu, Firefox has made all the links on the menus in question inactive....? they do however, still work in safari.....?
My versions are completely up to date. Help!

jordanamer.co.uk

My friend matt managed to install the javascript successfully for both browsers here but we can't decipher my problem

tomyangdesign
CHINA
2009-04-23 11:57:36
Permalink Post
 

thanks Cruz M, i just read your post now, and it works for me =)

Picahouette
NETHERLANDS
2009-05-25 21:55:08
Permalink Post
 

hi again...and again!!!
I am trying to follow Ross Cairns step by step guide to creating a collapsable menu, and am blocked at editing the index.php file in the sample folder.
I can t see the lines mentioned in this one, the only thing that appears is:


Built with Indexhibit

any ideas why or should I be opening the php file with another application to see the full content?
Thanks!!!

Picahouette
NETHERLANDS
2009-05-25 22:28:39
Permalink Post
 

sorry...have been too impatient again...
I have managed to find an application to open the php file and edit it...through jedit, a programmer's text editor (Jedit), might be handy for those other website dummies like me!!!!

cruz
PORTUGAL
2009-05-26 08:15:43
Permalink Post
 

In the HTML/CSS basics thread there are a lot of applications recommended to edit code. You can actually do it with TextEdit as long as you check the ignore rich text commands checkbox and use it as a plaintext editor. Or jEdit if you will.

Picahouette
NETHERLANDS
2009-05-26 22:14:20
Permalink Post
 

Hi...
nearly there...
a question bout the expandable menu...
Have used Ross Cairns guide and all seems to be going well other than the fact that when I click on a section, the sub-sections appear in a very thin typeface, which become bold again when a project is selected...any reason why?
any way to keep a constant font appearance?
thanks again!!
Webpage

Stig
NORWAY
2009-06-15 11:01:19
Permalink Post
 

@Picahouette
@SuperDuper

About fonts looking weird when you click a section title..
I had the same problem, but it disappeared when i sat the speed down to var speed = 0; in the expandingMenus.js file. No fancy animation, but kinda think it looks better anyway when it just drops down in a flash.

dirtysock
GERMANY
2009-06-19 12:45:53
Permalink Post
 

Hi all.

To be short, I try to get the expandable menus working in down_quark theme.

I did everything like ross told, but it doesn't seem to work. Could this be a jquery issue? The version used in down_quark is 1.2.6... the code in down_quark looks totally similar thought.

So any ideas?

Thanxs in advance....

lemathieu A
FRANCE
2009-06-19 13:33:41
Permalink Post
 

sorry but…
what is "down_quark"?

dirtysock
GERMANY
2009-06-19 15:05:48
Permalink Post
 

down Quark is a variation of crabwalk theme, found here: http://hold.unttld.com/. The code is quite similar to crabwalk.....

Picahouette
NETHERLANDS
2009-06-22 16:51:38
Permalink Post
 

Hey Stig,
Thanks for your response...however where can you find the var speed..?
I have setTimeout('move_up()', 0); (changed it from 4 to 0), doesn t change anything?
should I add in some code?
Thanks!!

Picahouette
NETHERLANDS
2009-06-22 16:53:41
Permalink Post
 

Hey Stig,
Thanks for your response...however where can you find the var speed..?
I have setTimeout('move_up()', 0); (changed it from 4 to 0), doesn t change anything?
should I add in some code?
Thanks!!

Picahouette
NETHERLANDS
2009-06-22 17:01:18
Permalink Post
 

oooops...sorry for the double post...internet is playing up on me!!

Picahouette
NETHERLANDS
2009-06-22 17:06:24
Permalink Post
 

...sorry again....am a complete idiot....can t even read to save my life!!!

ishnock
UNITED STATES
2009-07-02 20:13:24
Permalink Post
 

my page

I followed the tut, but the sections do not retract nor collapse

Can someone please take a look ..thanks...

This is what I used:

$(document).ready(function()
{setTimeout('move_up()', 1); expandingMenu(0); expandingMenu(1); expandingMenu(2); expandingMenu(3); } );

js file is in place as well.

Showing 26 - 75 of 286 posts in Forum > Ideas > Tutorial: collapsable menu -Spanish