title: Using .load() to add HTML form have some issues
body: <p>i am creating login web app using ajax and PHP and i use javascript an php to validate the input and it works for the login form,but i added a link under the form if not signed up before <a href="http://i.stack.imgur.com/IV9vP.png" rel="nofollow">the link under form</a>
  and the HTML for it is :</p>
  
  <pre><code> &lt;a href="#" onclick="signUpForm()"&gt;don't have account on tobe?&lt;/a&gt;
  </code></pre>
  
  <p>and the signUpForm() function contain</p>
  
  <pre><code>function signUpForm(){
      $(".logInForm").load("SignUpForm.html");
  }
  </code></pre>
  
  <p>and it works the content change 
  but when i use JS to validate input using code (just like the login code witch is working) :
  HTML(the input in the SignUpForm.html calls the signUp() function)</p>
  
  <pre><code>&lt;input type="button" value="Sign Up" onclick="signUp()"&gt;
  
  function signUp(){
      if($("input[class='user']").val()==""|| $("input[class='pass']").val()==""){
          $(".error-message").fadeIn();
          document.getElementById("error-message").innerHTML="Please fill all fields";
      } else{
       //action(2) including the php file loading 
      } 
  }
  </code></pre>
  
  <p>what happen is javascript ignores the new input fields and consider that the are deleted and always go to action(2) how can i make js see the new form html?</p>