title: how do I turn this into a 'on click' error message?
body: <p>I've got a user signup form with email and password inputs.</p>
  
  <p>I have the jQuery for the email to validate sorted but on the client side the password is to show an error on clicking submit if the password input is empty.</p>
  
  <p>I've got this working when the page loads</p>
  
  <pre><code>$(document).ready(function() {
      $(":input").each(function() {
         if($(this).val() === "")
              $('#password_default_value').show();
      });
  });
  </code></pre>
  
  <p>But need to get it so it only checks when the user clicks the #login-submit button</p>
  
  <p>I've tried</p>
  
  <pre><code>$(document).ready(function() {
      $('#login-submit').click(function() {
      $(":input").each(function() {
         if($(this).val() === "")
              $('#password_default_value').show();
      });
      }
  });
  </code></pre>
  
  <p>But it doesn't work. I'm guessing my code is badly in error somewhere but I can't see where.</p>
  
  <p>Any pointers?</p>