title: Checking for duplicate username
body: <p>I am doing a registration page, for my mobile app, and want to check for duplicate usernames entered by the user/client</p>
  
  <p>I have a button on the page that when clicked, checks availability of the username. However I would like to also incorporate that automatically, if not already done so, when the client clicks submit/go to step 3, 
  I want to perform the check for duplicate usernames using Ajax and if there exists a duplicate, then refresh the SAME page with the error message for duplication, else proceed to step 3.</p>
  
  <p>In my HTML file I have some js that does the following:</p>
  
  <pre><code>$("#check-username").click(function() {
  (...this works as I am able to click the CHECK button
  and see if the username exists)
  </code></pre>
  
  <p>I have another js file, that is sourced in my HTML that does the following:</p>
  
  <pre><code>submitHandler : function() {
   $("#reg1").hide();
   $("span#step").html("2");
   $("#check-username").click;
   $("#reg3").show();
   scrollTop();
  }
  </code></pre>
  
  <p>When I click on Go to next step which is reg3, It does not do the validation for check-username. Is my method/syntax for calling check-username correct?</p>