Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of .hide() that keeps the place in the layout?

Tags:

jquery

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 ?

like image 466
Misha Moroshko Avatar asked Jun 01 '10 12:06

Misha Moroshko


1 Answers

element.css('visibility', 'hidden')

To undo:

element.css('visibility', 'visible')
like image 74
Matchu Avatar answered Sep 28 '22 02:09

Matchu