jQuery: Toggling visibility

Now you see me.



The jQuery Code START
    
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {
          $("button").click(function() {
              $("h2").toggle();
          });
      });
    </script>
    
    <style type="text/CSS">
        <!--
        .code { color: red; }
        .back { background-color: yellow; }
        .pale { color: blue; }
        -->
   </style>
  </head>

  <body>
    <h1>jQuery: Toggling visibility</h1>

    <h2>Now you see me.</h2>
    <h2 style="display: none" class="pale">Now you don't.</h2>

    <button>Toggle the text</button>