Simple Toggle Question

I’m having trouble with the toggle() function from prototype.

Basically I want the element hidden by default, and I can’t seem to do
it.

My code:

The CSS:

#furtherinfo {
dislplay: none;
}

The View:

<%= link_to_function(‘Further Information’,
“Element.toggle(‘furtherinfo’)”) %>

Hidden by default, hopefully.

It works fine when I don’t have the css, but then it displays #details
by default.

Any ideas?

Thanks.

Do you have a typo, dislplay instead of display in the furtherinfo
section?

Stephan

On May 3, 2006, at 3:27 PM, Ben wrote:

dislplay: none;
It works fine when I don’t have the css, but then it displays #details
by default.

Any ideas?

Thanks.

When I use the toggle and want the div to first appear hidden, I find
that I need to put the display: none in the div itself.

-Ezra

unknown wrote:

Do you have a typo, dislplay instead of display in the furtherinfo
section?

Stephan

I guess I did in my example, but not in my actual app. Thanks though.

Thanks Ezra, that did the trick.