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 ?
views:
64answers:
2
+9
A:
element.css('visibility', 'hidden')
To undo:
element.css('visibility', 'visible')
Matchu
2010-06-01 12:02:36
And it even works in IE6. Gosh.
T.J. Crowder
2010-06-01 12:08:01
Thanks for the prompt answer !
Misha Moroshko
2010-06-01 12:12:18
+1
A:
You could try animating the opacity - something like:
$('your selector').animate({
opacity: 0 /* 0 = hide() ; 1 = show() */
}, 700);
Ian Oxley
2010-06-01 12:17:57