jQuery: Wrapping elements

This is paragraph 1.

This is paragraph 2.

This is paragraph 3.

This is paragraph 4.


The jQuery Code START
    
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript">
    
      function wrapper()  {
        $("p").wrap("<h1></h1>");
      }
      
      function wrapper2()  {
        $("p").wrap("<blockquote></blockquote>");
      }
      
      function wrapper3()  {
        $("p").unwrap("<h1></h1>");
      }
      
    </script>
    
    <style type="text/css">
        .code { color: red; }
        .back { background-color: yellow; }
    </style>
    
  </head>

  <body>
    <h1>jQuery: Wrapping elements</h1>
    <p>This is paragraph 1.</p>
    <p>This is paragraph 2.</p>
    <p>This is paragraph 3.</p>
    <p>This is paragraph 4.</p>
    <br />
    
    <form action="">
      <input type = "button" value="Wrap paragraphs in a header" onclick="wrapper()"></input>
      <input type = "button" value="Wrap paragraphs in a blockquote" onclick="wrapper2()"></input>
      <input type = "button" value="Unwrap paragraphs" onclick="wrapper3()"></input>
    </form>