I'm using prototype to update the contents of a div, and then it slides down after the previous div slides up. The problem is that the height it uses to do the animation doesn't seem to get updated to match the new content. I tried using getHeight and SetStyle to do it. But even getHeight doesn't have the height either. I guess cause its not being displayed. Any ideas?
on 2008-06-19 21:59
on 2008-06-20 22:39
This is because the animation is applying the height directly to the
element in the animation.
Try this,
Effect.SlideUp(element, {
afterFinish : function(fx){
fx.element.setStyle({height : "auto"});
}
})
--
Matt Foster
Ajax Engineer
Nth Penguin, LLC
http://www.nthpenguin.com