title: Opposite to jQuery .remove
body: <p>I have an input form I am trying to remove/add on a click function. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;script&gt;
          $(document).ready(function(){   
              $("#1").click(function () {
              $("#1").hide("");
              });
              $("#1").click(function () {
                   $("#twitter").remove();
              });
              $("#1").click(function () {
              $("#2").show("");
              });
  
                      $("#2").click(function () {
              $("#2").hide("");
              });
              $("#2").click(function () {
              $("#1").show("");
              });
              }); 
   &lt;/script&gt;
  
   &lt;span id="1"&gt;
   &lt;img align="left" src="../images/twitter_blue.png" width="30px;" style="margin:5px;"/&gt;
   &lt;div&gt;Share as @&lt;?php echo $_SESSION['username']  ?&gt;&lt;/div&gt;
   &lt;/span&gt;
   &lt;img align="left" id="2" src="../images/twitter_white.png" width="30px;" style="margin:5px;display:none;"/&gt;
    &lt;input id="twitter" type="hidden" name="twitter" value="yes"/&gt;
  </code></pre>
  
  <p>You can see that on click of the span id="1" it removes the image and the input form. And when you click on the img id="2" it hides that one and bring backs the original image. How can I bring back or add the input form that I originally remove on the click of the img id="2". Is there a function that is opposite of .remove?</p>
  
  <p>Thanks!</p>