title: How to disable space key on a password field
body: <p>How to disable space key on a password field.I've tried</p>
  
  <pre><code>$(document).ready(function() {
  $("#passwordId").live('keyup',function(e){
      if (e.keyCode == 32) {
         // e.preventDefault();
      return false;
      }
  });
  });
  </code></pre>
  
  <p>I even tried e.preventDefault();.On debugging it does enter in if but does not disable space key.Don't know what I am doing wrong.</p>