tags:

views:

64

answers:

2

When using .hide(), the element is no more participating in the layout of the page. But what if I want to keep its place, i.e I don't want other elements to move because this one is hidden now. How could I do this ?

+9  A: 
element.css('visibility', 'hidden')

To undo:

element.css('visibility', 'visible')
Matchu
And it even works in IE6. Gosh.
T.J. Crowder
Thanks for the prompt answer !
Misha Moroshko
+1  A: 

You could try animating the opacity - something like:

$('your selector').animate({
    opacity: 0 /* 0 = hide() ; 1 = show() */
}, 700);
Ian Oxley