jQuery SlideToggle 不能与 Firefox 中的 colspan 一起使用吗?

2024-04-01

<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);
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

jQuery SlideToggle 不能与 Firefox 中的 colspan 一起使用吗? 的相关文章

随机推荐