I'm trying to make a list filled with an unknown number of items animate out from underneath a div when it is being hovered over in such a way that it seems like the list is being pulled down rather than resized down. (The jquery slideDown() and slideToggle()-functions does the "pulled down" version nicely, but I want the list items to come down kinda like if you had written on roll-up curtains and were rolling it down.)
Lists, divs, or tables doesn't matter; as long as it looks like I want it to.
Here's a jsfiddle with the essentials of what I've tried. As in the real application, the only problem is that when it's in its up-rolled position, (sometimes) it's higher than the parent div and shows up above it.
In the code below (from jsfiddle), I want #popouter to only show when it's below #toggle, not when it sticks up above it when being "rolled up":
<div id="oneofmanyitems">
<div id="toggle"><h2>Click me to reveal the generated texts</h2></div>
<div id="popouter">
<div>Some generated text</div>
<div>Some generated text</div>
<div>Some generated text</div>
<div>Some generated text</div>
</div>
</div
I'd love for there to be a way to let the list items "float" down and just animate() up the height of the list until all of the items (starting with the top-most) popped out due to overflow: hidden, but that doesn't seem to be possible without having to give the items position:absolute and thus making them appear on top of each other in the bottom of the list.
Usually, I'd just Jquery-brute-force the divs to disappear after some arbitrary time of scrolling upp underneath the parent div, but in this case I also have the list-div that, in that case, would need to be partially (hidden in the top) as it goes up.
Anyone have any ideas on how to make this work? Maybe I'm just thinking into a corner by now and aren't seeing the obvious answer.
Thanks!