Show part of content again which is hide()

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?

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <style>
  5.   #div1 {
  6. float: left;
  7. border: 1px solid black;
  8. background-color: #EEEEEE;
  9. width: 200px;
  10. height: 200px;
  11.   }
  12.   #div2 {
  13. background-color: #FFFFFF;
  14. width: 100px;
  15. height: 100px;
  16.   }
  17.   </style>
  18.   <script src="http://code.jquery.com/jquery-latest.min.js"></script>
  19. </head>
  20. <body>
  21. <button id="hidr">Hide</button>
  22.   <button id="showr">Show</button>
  23.   <div id="div1">
  24. <div id="div2">
  25. Second div
  26. </div>
  27.   </div>
  28. <script>
  29.     $("#hidr").live('click', function () {
  30.       $("#div1").hide("fast");
  31.     });
  32.     $("#showr").live('click', function () {
  33.       $("#div2").show(2000);
  34.     });

  35. </script>

  36. </body>
  37. </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