title: hiding login form with Jquery
body: <p>I created login from  that when clicking submit button sends variables to login_success.php page.but I want to make that when I click submit button login form will be close. I can close form using Jquery </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
   $("button").click(function(){
     $(".loginform").hide();
   });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>But this time form does not sends request to .php file. I made it like addin script to .php file and then redirected to index.html site.It also good but I can see reflection.How can I combine them?</p>
  
  <p>this is my form </p>
  
  <pre><code>&lt;div class="loginform"&gt;
    &lt;form action="php/login.php" method="post" id="login"&gt;
  
          &lt;fieldset class="loginfield"&gt;
                      &lt;div&gt;
              &lt;label for="username"&gt;User Name&lt;/label&gt; &lt;input type="text" id="username" name="username"&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;label for="password"&gt;Password&lt;/label&gt; &lt;input type="password" id="password" name="password"&gt;
          &lt;/div&gt;
      &lt;/fieldset&gt;
        &lt;button type="submit" id="submit-go" &gt;&lt;/button&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Edit</strong>
  I used function as  NAVEED sad .I installed FireBug in firefox and I can see that my form validation works normal.It sends and request to login.php But I cant make any change on my form.It does not close or $arr values not shown on div tags. </p>