Scriptaculous effects don’t work unless your target _id_ has a child

September 14th, 2006

If you try to do:

new Effect.SlideDown('mydiv')

on

HTML:
  1. <div id="mydiv">
  2.   foo
  3. </div>

Scriptaculous will look at you with a blank stare. In order to work, the div seems to need to have a child element other than a text element. This will work, for instance:

HTML:
  1. <div id="mydiv">
  2.   <p>foo</p>
  3. </div>

Go figure.

programming, ruby on rails | Comments | Trackback Jump to the top of this page

Leave a Reply

  •  
  •  
  •  

You can keep track of new comments to this post with the comments feed.

Recently on Flickr

    mull - 21.jpgmull - 20.jpgmull - 19.jpgmull - 18.jpg

Recently Listened

Meta

The Carousell