title: If form is submitted show div
body: <p>I got a login button and when you click on it, the div with class .loginfields is shown. When you login, I want it to be shown as well. I can't figure out how this should be doen.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          if($("#login").submit()) { function(e) {
               $(".loginfields").show();
          }}
  
          $(".loginfields").hide();
          $(".loginenable").show();
  
          $('.loginenable').click(function(){
             $(".loginfields").slideToggle();
          });
      });
  &lt;/script&gt;
  
  &lt;div class ="loginfields"&gt;
  &lt;form id="login" action="index.php" method="post"&gt; 
  </code></pre>
  
  <p>Thanks in advance.</p>