title: using jquery to change contents of form upon typing
body: <p>I am trying to get the default value to not go away on click, but rather when the user starts typing (so they know what the field is for)....the problem is the following:</p>
  
  <p>when I use onchange instead of onfocus it keeps the default value in there when they start typing. If its confusing what I am doing go to facebook and look how their search box works...thats what I am going for.</p>
  
  <pre><code>&lt;script&gt;
  
      function uFocus() {
          $('#fakeusername').hide();
          $('#username').show();
          $('#username').focus();
      }
  
      function uBlur() {
          if ($('#username').attr('value') == '') {
              $('#username').hide();
              $('#fakeusername').show();
          }
      }
  &lt;/script&gt;
  &lt;input style='width:202px;height:25px;margin-top:8px;font-size:14px;color:gray;' type='text'  name='fakeusername' id='fakeusername' value='  Username' onfocus='uFocus()' /&gt;
  &lt;input style='width:202px;height:25px;margin-top:8px;font-size:14px;color:#000000;display: none' type='text' name='username' id='username' value='' onblur='uBlur()' /&gt;
  </code></pre>