Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery for making DIV visible/invisible

I am planning to show a tree structure and on clicking the tree structure I wanted a grid to be displayed. Since I have to show a prototype, I am thinking of using Jquery to show the following

Application1 (Onclick)

  • Display a <DIV> with data (similar to a grid)

Application 2 (Onclick)

  • Collapse Application 1 Div (invisible)
  • Application 2 DIV (visible)

so on..

Is there any example that is available that I can use to simulate this?

like image 822
kalls Avatar asked Jul 08 '11 15:07

kalls


1 Answers

JQuery's hide but doesn't remove the space and show

$("#id").css({ visibility: 'hidden' }) // hidden element (not remove space)
$("#id").css({ visibility: 'visible' }) // show element
like image 78
Infomaster Avatar answered Nov 02 '22 06:11

Infomaster