リスト項目を使用してコードを変更します。ここに結果があります:http://jsfiddle.net/CtGmH/1/
CSS
#table {
width: 100%;
}
#table ul {
height: 30px;
background: green;
list-style-type: none;
padding: 0;
margin: 10px;
}
#table ul.odd {
background: red;
}
table li{position: relative; }
HTML
<div id="table">
<ul class="odd"><li>A</li></ul>
<ul><li>B</li></ul>
<ul class="odd"><li>C</li></ul>
<ul><li>E</li></ul>
</div>
<button onclick="window.show()">Show</button>
<button onclick="window.hide()">Hide</button>
JS
window.show = function() {
$("ul").animate({ 'height': 30 }, 5000);
$("ul li").css({'visibility':'visible'}).animate({ 'height': 30 }, 5000);
}
window.hide = function() {
$("ul").animate({ 'height': 0 }, 5000);
$("ul li").animate({ 'height': 0 }, 5000, function(){$("ul li").css({'visibility':'hidden'});});
}