views:

701

answers:

3

I'm using a jQuery slideToggle to show a hidden table row but it sets the display style to block and I need to to display table-row. any ideas how i could accomplish this?

thanks in advance

+2  A: 

You can use the callback to change this

$('#tableRowId').slideToggle( function(){
   $(this).css('display', 'table-row');
});
redsquare
A: 

This is a known bug (also here). with jQuery slideToggle. There isn't any way to use slideToggle and have it properly preserve the display style. You can apply the display style with a callback when the animation completes, but that may not achieve the effect you desire.

Adam Bellaire
It's worth noting that the bug report says using simply .toggle() works as expected.
Marc
A: 

just add this code to callback function

$(this).css('display','');

Ankit Jadav