Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
-2
rated 0 times [  2] [ 4]  / answers: 1 / hits: 49226  / 13 Years ago, fri, july 8, 2011, 12:00:00

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?


More From » jquery

 Answers
79

Here is a real basic example: http://jsfiddle.net/YBABG/1/



<div class=parentNode a1>Application 1
<div class=childNode>Information</div>
</div>
<div class=parentNode a2>Application 2
<div class=childNode>Information</div>
</div>


$(.childNode).hide();

$(.parentNode).click(function(){
$(.childNode).hide(100);
$(this).children().show(100);
});


Specifying a duration in hide will create a simple animated effect.


[#91290] Thursday, July 7, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jayla

Total Points: 14
Total Questions: 96
Total Answers: 123

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
jayla questions
;