> After playin around with this some more ... I'm beginning to wonder if > it is even possible to collapse a table row with .hide() and .show() > from the fx module.
Don't forget about .fadeIn()/Out - those should work "as is". About the animation of rows/table cells: It's really really painful, but doable. For animating the height of a row, you need to animate the contents of every single cell within the row, for example: <tr> <td><div style="height: 10px;overflow:hidden;">test</div></td> <td><div style="height: 10px;overflow:hidden;">hello</div></td> </tr> This is because, in the HTML spec "the height of a row is as tall as its tallest column" (or some such). Additionally, animating a column.... that's something else. There seems to be two ways to do it. First, you can do the same technique as above, and innerWrap every td in the column and animate each individually. OR you can adjust the width of one cell within the column and it will effect the width of all other cells within the column - but only when its larger. For example: <tr> <td style="width:120px;">test</td> <td>hello</td> </tr> Yeah, so it's a mess. IMO, the animation of the height of a row is probably feasible - and something that we should consider. Otherwise, we'll never get anything different from the static .show() and .hide(). Ironically, the animated .show() and .hide() (right now) behave the same as the static .show() and .hide(), but just have a N millisecond delay, which is weird. So yeah, it's sticky for now. If we're really getting in to the nitty-gritty of animation, here's another thing: Currently when animating the height or width of an element, the padding is not animating - that means that there will be a large 'snap' in between something with a height of 0 and with a display: none. But that's something else to consider entirely. We need to make a list of "stupid problem areas in JavaScript/HTML/CSS". We can then check off the ones that we've solved (such as appending HTML <tr>..</tr> to a table) and ones that we haven't (animating the height of table rows, appending HTML <option> to a <select>, etc.). In fact, here's a wiki page for it: http://jquery.com/docs/HardProblems/ Let's flush this out! --John _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
