slideToggle in table row

hd. picture hd. · Feb 26, 2011 · Viewed 42.4k times · Source

does slideToggle work with table?

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

Answer

jwegner picture jwegner · Feb 26, 2011

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%">

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();

I've made a jsfiddle demonstrating this at http://jsfiddle.net/BU28E/1/

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/