<script type="text/javascript">
$(document).ready(function() {
$('#description').show();
$('#extender').click(function() {
$('#description').slideToggle("fast");
});
});
</script>
<tr>
<td>cell1</td>
<td><a href="#" id="extender">link</a></td>
</tr>
<tr id="description">
<td colspan="2" class="desc">This should span two columns but it doesnt bla jaajja</td>
</tr>
<tr>
<td>cell1</td>
<td>cell2</td>
</tr>
最佳答案
表格元素动画可能存在问题。 解决此问题的方法是将 TD 的主体放入 DIV 中,并为 DIV 制作动画。
在我的代码中我使用这样的东西:
var el = $("TR.post_"+_id+' TD');
el.wrapInner("<div/>");
$("TR.post_"+_id+' TD DIV').slideUp('500');
setTimeout(function(){el.remove()},500);
关于jQuery SlideToggle 不能与 Firefox 中的 colspan 一起使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1269220/