0

I have a problem getting an element to appear using scriptaculous Effect.toggle, I want the element to start hidden and appear onclick. If I set the element display to none inline the element will appear onclick, but if I set the element display to none in an external css file it does not work.

The script is required for a responsive menu so the display must be set in an external css file and the effect must toggle.

Jsfiddle with both examples: http://jsfiddle.net/TjFKy/

Does anyone know how to resolve this problem? Thank you

Michael
  • 147
  • 1
  • 2
  • 10

1 Answers1

0

Per the documentation, you have to set display: none; inline on these containers for these effects to work correctly.

Jason McCreary
  • 71,546
  • 23
  • 135
  • 174
  • That may be tough. This is a common requirement. You could always set or *reset* `display: none;` with JavaScript. Although you'd be duplicating code (CSS + JS). – Jason McCreary May 24 '12 at 21:05