jQuery slideToggle在Firefox中不能与colspan一起使用? [英] jQuery slideToggle doesn't work with colspan in Firefox?
本文介绍了jQuery slideToggle在Firefox中不能与colspan一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<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设置动画。
There might be a problem might with animating table element. Workaround for this is to put TD's body into a DIV, and animate a DIV.
在我的代码中,我使用以下内容:
In my code I use something like this:
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一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文