表格行中的slideToggle [英] slideToggle in table row

查看:101
本文介绍了表格行中的slideToggle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

slideToggle是否可以与表格一起使用?

does slideToggle work with table?

我想滑动表的一行.但它似乎没有任何作用.

I want to slideToggle a row of a table. but it just appears without any effect.

推荐答案

SlideToggle确实适用于表行,只是有点烂.

SlideToggle does work with table rows, it just kind of sucks.

如果表格行的高度大于最小行高度-像这样

If you have a table row with a height larger than it's minimum - like this

<tr height="30%">

然后,slidetoggle会向下平滑滑动直到达到最小高度...然后像您使用过的一样立即消失

Then slidetoggle will do a smooth slide down until the reaches it's minimum height... then it will dissapear immediately like you used

$("#tr").hide();

我在 http://jsfiddle.net/BU28E/1/

对您来说,更好的解决方案是使用由div组成的表. Divs将非常平稳地向上滑动.我在 http://jsfiddle.net/BU28E/2/

A better solution for you may be to use a table made out of divs. Divs will slide up very smoothly. I made another jsfiddle demonstrating this at http://jsfiddle.net/BU28E/2/

这篇关于表格行中的slideToggle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆