title: Refresh a div with jQuery
body: <p>Is it possible to refresh a single div with jQuery? I have a button that does logout a user. After the button is clicked, I want to show the login form, so I need to re-parse this div.</p>
  
  <p>The content of my div is this:</p>
  
  <pre><code>&lt;div id="signup" class="register"&gt;
  
      &lt;?php
          $email = $_COOKIE['email'];
          $login = $_COOKIE['login'];
  
          if($email != null &amp;&amp; $email != "" &amp;&amp; $login != null &amp;&amp; $login != "") {
              echo "&lt;h3&gt;you are logged in as &lt;b&gt;$email&lt;/b&gt;&lt;/h3&gt;&lt;br&gt;&lt;br&gt;&lt;button id='logoutbtn' class='submitButton'&gt;Logout&lt;/button&gt;";
          } else {
              // show login form
          }
      ?&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>This is my JavaScript part where I perform the logout:</p>
  
  <pre><code>$('#logoutbtn').click(function () {    
      $.ajax({  
          type: "POST",  
          url: "php/logout.php",  
          async: false,
          success: function(data){
              // reload signup div
          } 
      });  
  });
  </code></pre>
  
  <p>Edit: My logout.php script removes the cookies, that's why I need to re-parse the signup-div.</p>