[英]jQuery table row expand/collapse
I've got a table and it has rows that are collapsible when clicked on the table heading.我有一个表格,它的行在单击表格标题时可折叠。
Problem is it doesn't seem to be very smooth, there's a lag and jump once I click on the header and when the content shows.问题是它似乎不是很流畅,一旦我点击 header 并显示内容时,就会出现延迟和跳跃。 Does anyone know how to fix this?
有谁知道如何解决这一问题?
Unfortunately, table rows does not animate (with jquery) - see this related question on SO: How to Use slideDown (or show) function on a table row?不幸的是,表格行没有动画(使用 jquery) - 请参阅 SO: How to Use slideDown (or show) function on a table row?
Work-around will be to use div based layout or try out wrapping td content into divs and animating those divs - see this fiddle .解决方法是使用基于 div 的布局或尝试将 td 内容包装到 div 中并为这些 div 设置动画 - 请参阅this fiddle 。 Of course, you have to adjust the css.
当然,你必须调整css。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.