ben
1
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.
ben
2
Do you have a typo, dislplay instead of display in the furtherinfo
section?
Stephan
ben
3
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
ben
4
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.
ben
5
Thanks Ezra, that did the trick.