Show part of content again which is hide()
Hello,
Is it possible with jQuery to show a part of the content again which is already hide?
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- #div1 {
- float: left;
- border: 1px solid black;
- background-color: #EEEEEE;
- width: 200px;
- height: 200px;
- }
- #div2 {
- background-color: #FFFFFF;
- width: 100px;
- height: 100px;
- }
- </style>
- <script src="http://code.jquery.com/jquery-latest.min.js"></script>
- </head>
- <body>
- <button id="hidr">Hide</button>
- <button id="showr">Show</button>
- <div id="div1">
- <div id="div2">
- Second div
- </div>
- </div>
- <script>
- $("#hidr").live('click', function () {
- $("#div1").hide("fast");
- });
- $("#showr").live('click', function () {
- $("#div2").show(2000);
- });
- </script>
- </body>
- </html>
When I click on #hidr, #div1 is hide() like it should, but when I click on #showr, #div2 doesn't show up, probably because it is hide in div1.
Is there a workarround?
Christophe