Thanks Aaron for the suggestion. I think I found your blog/article about the "set height = auto" trick, and I did implemented it. Unfortunately, it expanded the container DIV immediately, not with a tween motion.
Also, from my understanding, the onComplete event is only triggered when a branch is fully opened, after a user clicked on it (or any other branch). In my case, the branch is left open (without any interaction from user, i.e. no "clicking" involve) during runtime. While this branch is kept open, a new DIV might be appended to it, or maybe remove from it. This addition or removal will change the branch's height on screen, and left some of the branch's content to be either hidden or left a huge chunk of empty space near the bottom. So if anyone can shed a light on how to utilize the Fx.Tween implemented in Accordion, would be very helpful :D Thanks :D On Jul 21, 11:18 pm, Aaron Newton <[email protected]> wrote: > You can add an onComplete method on accordion to set the section's height to > "auto" so that the flow is restored (this is what I do). > > On Tue, Jul 21, 2009 at 2:29 AM, sylver <[email protected]> wrote: > > > Hi, > > > I'm fairly new to Mootools, please be kind :D > > > I have an Accordion running with some branches. Each branch may be > > populated over time, with a code similar to this: > > > branch.appendChild(aNewDivNode) > > > Whenever I did that, and make the last DIV I added to be somewhere > > near the top of the branch, the last child inside the branch will be > > hidden, because the branch's height didn't expand to compensate the > > newly added DIV. > > > From what I can see, Accordion uses FX.Tween, i.e. when user clicked > > on a closed branch to open it. How can I call FX.Tween from within > > Accordion, to expand the branch's height on the fly? > > > Thanks :D
